FMOD.errors.pas 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // The graphics engine GLScene
  3. //
  4. unit FMOD.errors;
  5. (* ===============================================================================================
  6. FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004.
  7. ===============================================================================================
  8. NOTE: For the demos to run you must have either fmod.dll (in Windows)
  9. or libfmod-3.75.so (in Linux) installed.
  10. In Windows, copy the fmod.dll file found in the api directory to either of
  11. the following locations (in order of preference)
  12. - your application directory
  13. - Windows\System (95/98) or WinNT\System32 (NT/2000/XP)
  14. In Linux, make sure you are signed in as root and copy the libfmod-3.75.so
  15. file from the api directory to your /usr/lib/ directory.
  16. Then via a command line, navigate to the /usr/lib/ directory and create
  17. a symbolic link between libfmod-3.75.so and libfmod.so. This is done with
  18. the following command (assuming you are in /usr/lib/)...
  19. ln -s libfmod-3.75.so libfmod.so.
  20. *)
  21. interface
  22. uses
  23. FMOD.Types;
  24. (*
  25. Disable warning for unsafe types in Delphi 7
  26. *)
  27. {$IFDEF VER150}
  28. {$WARN UNSAFE_TYPE OFF}
  29. {$ENDIF}
  30. function FMOD_ErrorString(ErrorCode: TFModErrors): PChar;
  31. //---------------------------------------
  32. implementation
  33. //---------------------------------------
  34. function FMOD_ErrorString(ErrorCode: TFModErrors): PChar;
  35. begin
  36. case ErrorCode of
  37. FMOD_ERR_NONE: Result := 'No errors';
  38. FMOD_ERR_BUSY: Result := 'Cannot call this command after FSOUND_Init. Call FSOUND_Close first';
  39. FMOD_ERR_UNINITIALIZED: Result := 'This command failed because FSOUND_Init was not called';
  40. FMOD_ERR_PLAY: Result := 'Playing the sound failed';
  41. FMOD_ERR_INIT: Result := 'Error initializing output device';
  42. FMOD_ERR_ALLOCATED: Result := 'The output device is already in use and cannot be reused';
  43. FMOD_ERR_OUTPUT_FORMAT: Result := 'Soundcard does not support the features needed for this soundsystem (16bit stereo output)';
  44. FMOD_ERR_COOPERATIVELEVEL: Result := 'Error setting cooperative level for hardware';
  45. FMOD_ERR_CREATEBUFFER: Result := 'Error creating hardware sound buffer';
  46. FMOD_ERR_FILE_NOTFOUND: Result := 'File not found';
  47. FMOD_ERR_FILE_FORMAT: Result := 'Unknown file format';
  48. FMOD_ERR_FILE_BAD: Result := 'Error loading file';
  49. FMOD_ERR_MEMORY: Result := 'Not enough memory or resources';
  50. FMOD_ERR_VERSION: Result := 'The version number of this file format is not supported';
  51. FMOD_ERR_INVALID_PARAM: Result := 'An invalid parameter was passed to this function';
  52. FMOD_ERR_NO_EAX: Result := 'Tried to use an EAX command on a non EAX enabled channel or output';
  53. FMOD_ERR_CHANNEL_ALLOC: Result := 'Failed to allocate a new channel';
  54. FMOD_ERR_RECORD: Result := 'Recording is not supported on this machine';
  55. FMOD_ERR_MEDIAPLAYER: Result := 'Required Mediaplayer codec is not installed';
  56. else
  57. Result := 'Unknown error';
  58. end;
  59. end;
  60. end.