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

Java Development

Reply
Developer
burakk
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold
Accepted Solution

Playing 2 audio streams simultenaously

Hello all,

 

I am going to work on application that will play mix two audio streams. I read in a few sources that the device capability of doing this can be queried with: System.getProperty("supports.mixing"). In all of the simulators I tried, as well as on my 9700 Bold, it always returns "false". I wonder which models support this? References state most of the GSM models support this feature, I am confused. Thanks in advance,

 

 

Best Regards

Retired
PBernhardt
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30

Re: Playing 2 audio streams simultenaously

Basically, GSM devices support multiple audio channels. CDMA do not.. The simulator may not be giving you accurate data, try it on an actual device.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
burakk
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold

Re: Playing 2 audio streams simultenaously

Thanks, but my actual BB 9700 device also gives me "false". What do you suggest?

Retired
Retired
BVP
Posts: 150
Registered: ‎10-19-2010
My Device: Not Specified

Re: Playing 2 audio streams simultenaously

All devices will return false for supports.mixing.  As Paul mentioned, you can mix sounds by using 2 players simultaneously on devices that support it.  Otherwise, you will have to mix the audio yourself before passing to a player.  It isn't difficult to do, a forum search should give you articles and sample code that explains how, and the DevConOnDemand portal has relevent content as well.


Developer
burakk
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold

Re: Playing 2 audio streams simultenaously

[ Edited ]

Thank you BVP. I had searched the forum about this, will do a more detailed search and will have a look at the DevConOnDemand portal.

 

I am wondering now, why will all devices return supports.mixing?

Retired
Retired
BVP
Posts: 150
Registered: ‎10-19-2010
My Device: Not Specified

Re: Playing 2 audio streams simultenaously

Good question.  According to the MMAPI spec the requirements for supports.mixing is:

 

Query for whether audio mixing is supported. The string returned is either "true" or "false". If mixing is supported, the following conditions are true:

  • At least two tones can be played with Manager.playTone simultaneously.
  • Manager.playTone can be used at the same time when at least one Player is playing back audio.
  • At least two Players can be used to play back audio simultaneously

 

Since I have just verified that the return value is hard-coded to false for all devices, it would appear you've found a bug :smileyhappy:

Developer
burakk
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold

Re: Playing 2 audio streams simultenaously

BVP, thanks for the explanation.

 

ff (System.getProperty("supports.mixing").equals("true"))

{

...

}

 

statement is a bad-practice then?

 

Retired
Retired
BVP
Posts: 150
Registered: ‎10-19-2010
My Device: Not Specified

Re: Playing 2 audio streams simultenaously

It would seem so, yes.  Sorry about that!  :Oops: