Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Barry_BPD
Posts: 2
Registered: ‎01-07-2013
My Device: Blackberry Playbook 64GB
My Carrier: None

Crashes in multimedia renderer library

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

 

mmr_context_t *mmrContext[NUM_STREAMS];

 

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_output_attach for each one and checking the return values, which are all fine).

 

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?

Please use plain text.
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: Crashes in multimedia renderer library

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?

Please use plain text.