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
Developer
burakk
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold

Simultaneous Audio

Hi,

 

I will work on an Internet radio application in which I will need to stream two or more streams simultaneously. I accomplished that in prior BB versions and in Android version. I'd like to know whether that is possible in BB10 devices. Do they have multiple audio channels?

 

 

Best Regards,

 

Burak

New Developer
MedNez
Posts: 67
Registered: ‎11-24-2008
My Device: Not Specified

Re: Simultaneous Audio

This involves multiple sounds.

 

https://github.com/blackberry/Presentations/tree/master/2012-BlackBerryJam-Americas/JAM09/BaDumTss

 

While the sounds are not "streaming" per se, this should get you started.

Developer
RileyGB
Posts: 284
Registered: ‎08-06-2010
My Device: Z10

Re: Simultaneous Audio

From my experience, BB10 plays multiple audio sources without any issues at all.



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Developer
jasoncheung
Posts: 67
Registered: ‎09-01-2012
My Device: Dev Alpha

Re: Simultaneous Audio

Playing multiple audio files is very simple. Basic way is to create multiple MediaPlayer objects and play them at the same time.
New Developer
MedNez
Posts: 67
Registered: ‎11-24-2008
My Device: Not Specified

Re: Simultaneous Audio


jasoncheung wrote:
Playing multiple audio files is very simple. Basic way is to create multiple MediaPlayer objects and play them at the same time.

I would weigh up your options before doing this. I tried this initially - and it consumes a lot of resources (understandably, if you're adding more MediaPlayer objects). If you do it the C++ way (see the link I posted to a sample which has concurrent, simultaneous sounds, done with half a dozen lines of C++), then it's not as resource intensive.

Developer
RileyGB
Posts: 284
Registered: ‎08-06-2010
My Device: Z10

Re: Simultaneous Audio

One thing to note with the BBJAM class is that it does not play mp3s. Furthermore, you cannot have mp3s in your sound directory or it will fail as well (due to pre-caching).



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Developer
burakk
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold

Re: Simultaneous Audio

Thanks all...

 

RileyGB, did you try to stream multiple audio streams via HTTP connection, or just play two local audio files simultaneously?