0
0

Hi all,

I’m struggling with my fmod-based media player. It all works fine but if the streaming server stops then my app begins stuttering, and I don’t know how to stop it.

Basically I do this:

FMOD_System_Create(aSystem);
FMOD_System_Init(aSystem,1,FMOD_INIT_NORMAL,nil);

Result := FMOD_System_CreateSound(aSystem,PChar(Url),
FMOD_DEFAULT or FMOD_CREATESTREAM, nil,aSound);

if Result=FMOD_OK then
begin
Result := FMOD_System_PlaySound(asystem, FMOD_CHANNEL_FREE, asound, false, channel);
end;

This all works fine.

but when the stream stops (because the remote server is down) then I check this:

FMOD_Sound_GetOpenState(aSound,State,PercBuffered,Starving);

I get a Starving=true, but if I then open a new stream (to a different server) with create_sound and then playsound the app hangs at the playsound.

I also tried stopping the channel with FMOD_Channel_STOP, but it hangs there,
also if I try to do a FMOD_Sound_Release, it hangs on that call.

And with hanging I mean more than several minutes not responding ( I do not know how much more, I am not that patient).

Is there any way I can correctly stop playing this stream, and play the next one?

The version is 4.22.3

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.