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:
_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!
- EmmanuelOga asked 10 years ago
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.
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.
- Janus answered 10 years ago
Please login first to submit.