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