fmoderrors.pas 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // This unit is part of the GLScene Engine, http://glscene.org
  3. //
  4. { =============================================================================================== }
  5. { FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004. }
  6. { =============================================================================================== }
  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. unit fmoderrors;
  22. interface
  23. uses
  24. fmodtypes;
  25. {
  26. Disable warning for unsafe types in Delphi 7
  27. }
  28. {$IFDEF VER150}
  29. {$WARN UNSAFE_TYPE OFF}
  30. {$ENDIF}
  31. function FMOD_ErrorString(ErrorCode: TFModErrors): PChar;
  32. implementation
  33. function FMOD_ErrorString(ErrorCode: TFModErrors): PChar;
  34. begin
  35. case ErrorCode of
  36. FMOD_ERR_NONE: Result := 'No errors';
  37. FMOD_ERR_BUSY: Result := 'Cannot call this command after FSOUND_Init. Call FSOUND_Close first';
  38. FMOD_ERR_UNINITIALIZED: Result := 'This command failed because FSOUND_Init was not called';
  39. FMOD_ERR_PLAY: Result := 'Playing the sound failed';
  40. FMOD_ERR_INIT: Result := 'Error initializing output device';
  41. FMOD_ERR_ALLOCATED: Result := 'The output device is already in use and cannot be reused';
  42. FMOD_ERR_OUTPUT_FORMAT: Result := 'Soundcard does not support the features needed for this soundsystem (16bit stereo output)';
  43. FMOD_ERR_COOPERATIVELEVEL: Result := 'Error setting cooperative level for hardware';
  44. FMOD_ERR_CREATEBUFFER: Result := 'Error creating hardware sound buffer';
  45. FMOD_ERR_FILE_NOTFOUND: Result := 'File not found';
  46. FMOD_ERR_FILE_FORMAT: Result := 'Unknown file format';
  47. FMOD_ERR_FILE_BAD: Result := 'Error loading file';
  48. FMOD_ERR_MEMORY: Result := 'Not enough memory or resources';
  49. FMOD_ERR_VERSION: Result := 'The version number of this file format is not supported';
  50. FMOD_ERR_INVALID_PARAM: Result := 'An invalid parameter was passed to this function';
  51. FMOD_ERR_NO_EAX: Result := 'Tried to use an EAX command on a non EAX enabled channel or output';
  52. FMOD_ERR_CHANNEL_ALLOC: Result := 'Failed to allocate a new channel';
  53. FMOD_ERR_RECORD: Result := 'Recording is not supported on this machine';
  54. FMOD_ERR_MEDIAPLAYER: Result := 'Required Mediaplayer codec is not installed';
  55. else
  56. Result := 'Unknown error';
  57. end;
  58. end;
  59. end.