0
0

Hi, i set a Callback like that:

[code:2d7h85uw]FMOD_Channel_SetCallback( PlayerA.channel,FMOD_CHANNEL_CALLBACKTYPE_END, @CallBackSongEnd_plA, 0 );
ErrCheck(FmodSys.result);
[/code:2d7h85uw]

To this Function:

[code:2d7h85uw] function CallBackSongEnd_plA(channel: FMOD_CHANNEL; callbacktype: Cardinal; callback: FMOD_CHANNEL_CALLBACK; command: Integer): FMOD_RESULT;
begin
ShowMessage(’Testing’);
Result := FMOD_OK;
end;[/code:2d7h85uw]

but the app hangs right after the message box and never comes back.
If i comment the setcalback out, everything works fine.
For the systemupdate i tried at first a 2 millisecond fast timer.

The program crashes also, when i try to release it, here it is the same when i comment the setcallback function out, everything is going to work well.

[code:2d7h85uw]if playerA.sound <> nil then begin

FmodSys.result := FMOD_Sound_Release(playerA.sound);
ERRCHECK(FmodSys.result);

end;[/code:2d7h85uw]

What am i doing wrong?

Thanks in advance,
Julian

  • You must to post comments
0
0

Found the error:
its obvious that there is missing something:

[code:1u7dvq80]
function CallBackSongEnd_plA(channel: FMOD_CHANNEL; callbacktype: Cardinal; callback: FMOD_CHANNEL_CALLBACK; command: Integer): FMOD_RESULT;
begin
ShowMessage(’Testing’);
Result := FMOD_OK;
end;[/code:1u7dvq80]

the right has to be:
[code:1u7dvq80]
function CallBackSongEnd_plA(channel: FMOD_CHANNEL; callbacktype: Cardinal; callback: FMOD_CHANNEL_CALLBACK; command: Integer; commanddata1:word; commanddata2:word): FMOD_RESULT;
begin
ShowMessage(’Testing’);
Result := FMOD_OK;
end;[/code:1u7dvq80]

Julian

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.