NS/main/source/includes/fmodapi375linux/api/delphi/fmoderrors.pas
2014-12-16 14:36:27 +01:00

67 lines
3.1 KiB
ObjectPascal

{ =============================================================================================== }
{ FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004. }
{ =============================================================================================== }
{
NOTE: For the demos to run you must have either fmod.dll (in Windows)
or libfmod-3.75.so (in Linux) installed.
In Windows, copy the fmod.dll file found in the api directory to either of
the following locations (in order of preference)
- your application directory
- Windows\System (95/98) or WinNT\System32 (NT/2000/XP)
In Linux, make sure you are signed in as root and copy the libfmod-3.75.so
file from the api directory to your /usr/lib/ directory.
Then via a command line, navigate to the /usr/lib/ directory and create
a symbolic link between libfmod-3.75.so and libfmod.so. This is done with
the following command (assuming you are in /usr/lib/)...
ln -s libfmod-3.75.so libfmod.so.
}
{ =============================================================================================== }
unit fmoderrors;
interface
uses
fmodtypes;
{
Disable warning for unsafe types in Delphi 7
}
{$IFDEF VER150}
{$WARN UNSAFE_TYPE OFF}
{$ENDIF}
function FMOD_ErrorString(ErrorCode: TFModErrors): PChar;
implementation
function FMOD_ErrorString(ErrorCode: TFModErrors): PChar;
begin
case ErrorCode of
FMOD_ERR_NONE: Result := 'No errors';
FMOD_ERR_BUSY: Result := 'Cannot call this command after FSOUND_Init. Call FSOUND_Close first';
FMOD_ERR_UNINITIALIZED: Result := 'This command failed because FSOUND_Init was not called';
FMOD_ERR_PLAY: Result := 'Playing the sound failed';
FMOD_ERR_INIT: Result := 'Error initializing output device';
FMOD_ERR_ALLOCATED: Result := 'The output device is already in use and cannot be reused';
FMOD_ERR_OUTPUT_FORMAT: Result := 'Soundcard does not support the features needed for this soundsystem (16bit stereo output)';
FMOD_ERR_COOPERATIVELEVEL: Result := 'Error setting cooperative level for hardware';
FMOD_ERR_CREATEBUFFER: Result := 'Error creating hardware sound buffer';
FMOD_ERR_FILE_NOTFOUND: Result := 'File not found';
FMOD_ERR_FILE_FORMAT: Result := 'Unknown file format';
FMOD_ERR_FILE_BAD: Result := 'Error loading file';
FMOD_ERR_MEMORY: Result := 'Not enough memory or resources';
FMOD_ERR_VERSION: Result := 'The version number of this file format is not supported';
FMOD_ERR_INVALID_PARAM: Result := 'An invalid parameter was passed to this function';
FMOD_ERR_NO_EAX: Result := 'Tried to use an EAX command on a non EAX enabled channel or output';
FMOD_ERR_CHANNEL_ALLOC: Result := 'Failed to allocate a new channel';
FMOD_ERR_RECORD: Result := 'Recording is not supported on this machine';
FMOD_ERR_MEDIAPLAYER: Result := 'Required Mediaplayer codec is not installed';
else
Result := 'Unknown error';
end;
end;
end.