01-28-2013 10:47 PM
I'm using mmr library for both sound effects and background music in my game.
When testing my game on the device, occasionally (once every couple of days), all sound will suddenly stop. I exit out of my application and it will not restart - it attempts to load then stops at the splash screen for a few seconds before quitting. The same with other apps such as the Tetris game from EA, or many other games that I have downloaded from App World. Some games will start, but they play without sound.
Volume is set to maximum on the device.
In my code I have defined
and I open all streams used in the game right after the app opens, in my sound_init() function (calling mmr_connect(), mmr_context_create(), mmr_
Thereafter, in my sound_play(int id) function, I call
mmr_play( mmrContext[id] )
This works fine 99% of the time. However, after some time (we're talking several hours of playing up to a couple of days), all sound in my game will suddenly stop (though it will continue to run, without sound), and from then on no other app on the Playbook will produce sound until I restart the device.
Because it is so rare, I cannot reliably recreate this and it has me worried. What could be the cause of this and why doesn't mmr_play return an error but instead returns 0 even though it crashed? Also why would it also affect every other app on the device?
02-07-2013 01:05 AM
I can't comment on the issue you are seeing, however, using mmr for SFX seems like it may be overtaxing the system (perhaps due to some post mmr_play cleanup not happening?). Have you considered OpenAL for this purpose?