0
0

Well I have been using FMOD with Delphi for some time. Never had problems but the fmod.pas for FMODEx has some mistakes. Which of course is obvious because this file isn’t the main thing for the FMOD developers.
I will post as much things as I can find.

1)
[b:3hd18hjq]Error[/b:3hd18hjq]
[code:3hd18hjq]Undeclared identifier: ‘FMOD_CODEC_SETPOSITIONCALLBACK'[/code:3hd18hjq]
[b:3hd18hjq]Fix[/b:3hd18hjq]
fmodtypes.pas : line 1078
[code:3hd18hjq]FMOD_CODEC_SETPOSITIONPCMCALLBACK = function (codec: FMOD_CODEC; subsound: Integer; pcm: Cardinal): FMOD_RESULT; stdcall;[/code:3hd18hjq]must be
[code:3hd18hjq]FMOD_CODEC_SETPOSITIONCALLBACK = function (codec: FMOD_CODEC; subsound: Integer; pcm: Cardinal): FMOD_RESULT; stdcall;[/code:3hd18hjq]

  • You must to post comments
0
0

Discovered in beta 30:

[quote:1wctx8ww]function FMOD_System_GetCPUUsage(system: FMOD_SYSTEM; var cpuusage: Single): FMOD_RESULT; stdcall;[/quote:1wctx8ww]

should be:

[quote:1wctx8ww]function FMOD_System_GetCPUUsage(system: FMOD_SYSTEM; var dsp, stream, update, total: Single): FMOD_RESULT; stdcall;[/quote:1wctx8ww]

Bert

  • You must to post comments
0
0

Functions
FMOD_System_SetStreamBufferSize
FMOD_System_GetStreamBufferSize
should be
[quote:1i5350j3]
function FMOD_System_SetStreamBufferSize (system: FMOD_SYSTEM; filebuffersize: Cardinal; filebuffersizetype: Cardinal): FMOD_RESULT; stdcall;
function FMOD_System_GetStreamBufferSize (system: FMOD_SYSTEM; var filebuffersize: Cardinal; filebuffersizetype: Cardinal): FMOD_RESULT; stdcall;
[/quote:1i5350j3]
Bert

  • You must to post comments
0
0

8) concerning FMODEx 40031

[b:3694fap5]Fix[/b:3694fap5]
fmodtypes.pas : line 1075
[code:3694fap5] FMOD_CHANNEL_CALLBACK = function (channel: FMOD_CHANNEL; evdata: Cardinal; type_: Cardinal): FMOD_RESULT; stdcall;[/code:3694fap5]must be
[code:3694fap5] FMOD_CHANNEL_CALLBACK = function (channel: FMOD_CHANNEL; callbacktype: Cardinal; command: Integer; commanddata1, commanddata2: Cardinal): FMOD_RESULT; stdcall;[/code:3694fap5]

  • You must to post comments
0
0

2)

[b:2ho96qm9]Error[/b:2ho96qm9]
[code:2ho96qm9]Too many actual parameters[/code:2ho96qm9]
[b:2ho96qm9]Fix[/b:2ho96qm9]
fmod.pas : line 206
[code:2ho96qm9]function FMOD_Sound_GetOpenState (sound: FMOD_SOUND; var openstate: FMOD_OPENSTATE): FMOD_RESULT; stdcall;[/code:2ho96qm9]must be
[code:2ho96qm9]function FMOD_Sound_GetOpenState (sound: FMOD_SOUND; var openstate: FMOD_OPENSTATE; var percentbuffered: Cardinal; var starving: Boolean): FMOD_RESULT; stdcall;[/code:2ho96qm9]

  • You must to post comments
0
0

3)

[b:2ts1msf7]Fix[/b:2ts1msf7]
fmod.pas : line 98
[code:2ts1msf7]function FMOD_System_SetStreamBufferSize (system: FMOD_SYSTEM; decodebuffersize: Integer; decodebuffersizetype: Cardinal; filebuffersize: Integer; filebuffersizetype: Cardinal): FMOD_RESULT; stdcall;[/code:2ts1msf7]must be
[code:2ts1msf7]function FMOD_System_SetStreamBufferSize (system: FMOD_SYSTEM; decodebuffersize: Cardinal; decodebuffersizetype: Cardinal; filebuffersize: Cardinal; filebuffersizetype: Cardinal): FMOD_RESULT; stdcall;[/code:2ts1msf7]

  • You must to post comments
0
0

FMOD_Sound_GetOpenState doesn’t seem to work properly.

As noted in [url:20oaxm58]http://www.fmod.org/forum/viewtopic.php?p=17608#17608[/url:20oaxm58]
the GetOpenState function came 2 parameters short. Was there a particular reason for this?
The problem is the PercentBuffered variable keep getting the value 0, the states change, from connecting to buffering to ready, but PercentBuffered stays 0 all the time.

Thanks

  • You must to post comments
0
0

4)

[b:2wtlqtyp]Error[/b:2wtlqtyp]
[code:2wtlqtyp]Unsatisfied forward or external declaration: ‘FMOD_System_LoadGeometry'[/code:2wtlqtyp]
[b:2wtlqtyp]Fix[/b:2wtlqtyp]
fmod.pas : line 547 add the following
[code:2wtlqtyp]function FMOD_System_LoadGeometry ; external FMOD_DLL;[/code:2wtlqtyp]

  • You must to post comments
0
0

5)

[b:2crzh2aa]Fix[/b:2crzh2aa]
fmod.pas : line 268
[code:2crzh2aa]function FMOD_Channel_SetCallback (channel: FMOD_CHANNEL; type_: Cardinal; evdata: Cardinal; callback: FMOD_CHANNEL_CALLBACK): FMOD_RESULT; stdcall;[/code:2crzh2aa]must be
[code:2crzh2aa]function FMOD_Channel_SetCallback (channel: FMOD_CHANNEL; type_: Cardinal; callback: FMOD_CHANNEL_CALLBACK; UserData: Integer): FMOD_RESULT; stdcall;[/code:2crzh2aa]

Note: I also changed ‘command: Integer’ to ‘UserData: Integer’ to be more compatible with FMOD3, you could of course not implement this change.

  • You must to post comments
0
0

6)

[b:kfgor0mn]Fix[/b:kfgor0mn]
fmodtypes.pas : line 1047
[code:kfgor0mn] FMOD_CHANNEL_CALLBACK = function (channel: FMOD_CHANNEL; evdata: Cardinal; type_: Cardinal): FMOD_RESULT; stdcall;[/code:kfgor0mn]must be
[code:kfgor0mn] FMOD_CHANNEL_CALLBACK = function (channel: FMOD_CHANNEL; type_: Cardinal; UserData: Integer; commanddata1, commanddata2: Cardinal): FMOD_RESULT; stdcall;[/code:kfgor0mn]

Note: I also changed ‘command: Integer’ to ‘UserData: Integer’ to be more compatible with FMOD3, you could of course not implement this change.

  • You must to post comments
0
0

[quote:2d74bi8d]This is wrong. userdata is not what it is. It is a callback command (it tells the callback how to behave, as explained in the documention).

userdata is done by using Channel::setUserData Channel::getUserData.
Don’t relate FMOD Ex to FMOD3. You should always refer to the C header of FMOD Ex.[/quote:2d74bi8d]
Alright, already tought this was a stupid idea.
The problem I had with the percentbuffered, as mentioned before, seems to be alright now with 40025.

  • You must to post comments
0
0

7) concerning FMODEx 40030

[b:3bvajppf]Fix[/b:3bvajppf]
fmoderrors.pas : line 26
[code:3bvajppf] FMOD_ERR_ALREADYLOCKED, FMOD_ErrorString := ‘Tried to call lock a second time before unlock was called.’;[/code:3bvajppf]must be
[code:3bvajppf] FMOD_ERR_ALREADYLOCKED: FMOD_ErrorString := ‘Tried to call lock a second time before unlock was called.’;[/code:3bvajppf]

  • You must to post comments
Showing 11 results
Your Answer

Please first to submit.