0
0

Hi,

i get some trouble while trying to stop a Stream from a internet radio or similar if the connect did not success. My Code look like this:
[code:11dwkoag]
streamHandle = FSound.FSOUND_Stream_Open(mediaString, FSound.FSOUND_NORMAL | FSound.FSOUND_NONBLOCKING, 0, 0);
[/code:11dwkoag]

After the init, i observe the Networkstate, there i get the Error state for the Stream similar to FSOUND_STREAM_NET_NOT_CONNECTED or FSOUND_STREAM_NET_ERROR:

[code:11dwkoag]
FSound.FSOUND_Stream_Net_GetStatus(streamHandle, netStatusBuffer);
[/code:11dwkoag]

All works fine until i try to close the Stream via :
[code:11dwkoag]
while (!FSound.FSOUND_Stream_Stop(streamHandle))
{
pause(10); // wait 10 ms
System.out.println("[FMODStreamPlayer] FSound.FSOUND_Stream_Stop "+streamHandle);
}
[/code:11dwkoag]

The Streamhandle i got is valid, but the FSOUND_Stream_Stop never returns true.Did someone has a solution ? Should the StreamHandle be valid without a connect ?

  • jens
  • You must to post comments
0
0

Use FSOUND_Stream_Close. This will properly clean up net streams that have failed to connect.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.