0
0

I’m using last version of FMODEEX on windows 2000 and i have a problem.

Supose i play a sound creating a stream like this:

[code:193f4bta]_system->createStream("\\sharedPc\mp3\File.mp3",
FMOD_CREATECOMPRESSEDSAMPLE |
FMOD_2D |
FMOD_IGNORETAGS |
FMOD_LOWMEM,
0, &_sound);

_result= _system->playSound(FMOD_CHANNEL_FREE, _sound, false, &_channel);[/code:193f4bta]

Then i repeteadly call _system->update().

This works superb, the problem arises when some network error happen. I disconnected the network cable from the machine "sharedPc" to see what would happen to my app: it completely crashed, playing repeatedly the last bytes from the stream buffer.

QUESTION: How can i intercept such network errors when playing a file??

Thank you very much!

  • You must to post comments
0
0

If you’re using windows file sharing then you can’t do anything about those network errors. Pulling the network cable out in this context is like pulling your harddrive out on a local file. If you want proper handling of network issues, use netstreams by specifying a URL (i.e. http://blah.blah.blah/file.mp3) instead.

  • You must to post comments
0
0

If you need to detect a disconnect from a specific network PC you can set up a background thread or polling check to perform a periodic inexpensive check to make sure the system is still alive. (Ping, etc.) If the check fails more than once or twice, manually stop the stream.

It won’t be perfect, but it should work.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.