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
Contributor
Posts: 27
Registered: ‎09-29-2010
My Device: 9800 Torch
My Carrier: AT&T

Simultaneous Audio Hell

I'm porting an app from iPhone to BlackBerry and the app absolutely requires that two long audio files play simultaneously. Due to HW limitations on the iPhone, one file was Mp3 and the othe M4A (can't do 2 MP3s on older iOS devices).

 

I had done a test early in the development and found that my older Bold 9000 could handle two MP3s at once using two instantiations of Player. Worked in the simulator, worked on the phone. I also know that CDMA chipsets can't handle two audio streams so I just wrote off Verizon (as I have had to for GPS apps as well).

 

But now, I have installed a simple test app (after weeks of writing the main UI for the app) on my Torch (AT&T) and, *surprise!*, it can't play two MP3s at once. What the heck is going on? As usual, it works in the simulator but not on the phone itself.

 

Things I have tried:

 

- Using System.getProperty("supports.mixing"). This returns false regardless of whether the device does support mixing or not (it gives me false in the simulator and false on the Bold 9000 which clearly works). It seems to ONLY return false. Useless except as a replacement for (1==0).

 

- I also tried using the Browser method of playing audio hoping I could use that for one stream and Player for the other. Unfortunately, this kicks you to the Media player app. Example: getDefaultSession().displayPage("file:///"+fpath). Strike two.

 

- The Torch  PlayerListener clearly shows a STOP being called on the first Player when the second has play() called on it. I see this with the Torch but not with the Bold. Restarting the stopped Player just stops the other (like CDMA).

 

So here are my concerns:

 

1. I have no idea which BlackBerry models *will* play two MP3s simultanously in the real world. Are there other Torch like phones out there where dual play works in the sim and not on the phone? Am I going to have to refund App World sales because I don't have a million models laying about my office to test on?

 

2. Is there a new OS 6 UI I should be using for the Torch/Tour and everything else that is non-CDMA is fine?

 

I have to say, handling all the kinks in each model is *exhausting*, sigh...

 

Thanks!

 

Mitch

 

 

Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Simultaneous Audio Hell

Pretty much none of the devices will play two audio files at the same time. Sorry.


Read my thoughts on BlackBerry Development at news.ebscer.com
Contributor
Posts: 27
Registered: ‎09-29-2010
My Device: 9800 Torch
My Carrier: AT&T

Re: Simultaneous Audio Hell

Sorry, Ebscer, but that is not correct.

 

The Bold 9000 on AT&T and the latest Curve 9300 both work fine.

 

What I need is a programmatic way to know (that works) as well as an explanation why the latest, greatest BB (the Torch) does not work.

Highlighted
Developer
Posts: 149
Registered: ‎04-23-2011
My Device: BlackBerry 9700 Bold
My Carrier: Turkcell

Re: Simultaneous Audio Hell

Hello makahn64,

 

Did you find a way to detect whether the device supports audio mixing? Which models do support this?

 

 

Best Regards,