11-05-2012 10:18 AM
Hello all,
this community has been very helpful recently so I thought I'd see if someone here can give me a few hints with my current problem.
I'm trying to interface a custom multiplatform library, let's call it L, with the audio system in BB, where L acts like a wrapper around BB, and has the following functionalities (rough sketch).
class L
{
list_of_audio_channels lac;
Init();
Play(sound, which_audio_chanel);
Stop(sound, which_audio_channel);
Volume(sound, which_audio_channel, volume);
Exit();
}
Where a sound can be set to play in a particular channel, stopped, changed volume, etc. And a sound can be in any supported format.
My problem is I'm a bit lost at the moment. The two existing BB audio samples use what appear to be different libraries (one has everything prefixed with snd_pcm_xxx and the other one with mmr_xxx), and both only play one single sample.
If anyone can give me some rough guidelines on what functions / structure I should be looking to be able to make a library that plays multiple sounds simultaneously, in multiple channels, and how to initialize such library, I'd be really helpful.
I'm not an audio programmer, and my knowledge in the area is limited, so maybe I'm missing something obvious in the samples / docs that would help me build this system without too much fuss.
Thank you for the help,
Jaime
PS: If I haven't explained something clearly enough please let me know.
Solved! Go to Solution.
11-05-2012 04:46 PM
Use this example here.
http://developer.blackberry.com/native/documentati
If determining a new value for ctxt_name you can play multiple sounds at once.
11-06-2012 11:07 AM
11-16-2012 08:20 AM
11-16-2012 09:28 AM
I use for this
if ((ctxt = mmr_context_create (connection, ctxt_name, 0, mode))
If the flow exists, the sound plays.
11-16-2012 02:29 PM
Unfortunately in my case it want do. I call mmr_context_create for all my sounds during game's initialisation stage, so even if the sound isn't playing mmr_context_create will return null when I try to check if a sound is playing