BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-15-2007, 04:39 PM   #1 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: ATT
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question AudioPath for recording?

Please Login to Remove!

I would like to be able to choose the audio path for recording sound, ie handset, headset , bluetooth etc., does anyone know if this is possible?

If I create a player for audio capture ie:

Player p = javax.microedition.media.Manager.createPlayer("cap ture://audio");

The player does not contain or return an AudioPathControl, is there any way to set the audio path for recording? Is there any other way to create a player for audio capture where I can set the audio path?

Thanks.

Mark
Offline  
Old 08-16-2007, 09:39 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

AudioPathControl audiopathcontrol = (AudioPathControl) p.getControl("net.rim.device.api.media.control.Aud ioPathControl");

audiopathcontrol.setAudioPath(AudioPathControl.AUD IO_PATH_HANDSET);

etc etc
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!

Last edited by jfisher : 08-16-2007 at 09:43 AM.
Offline  
Old 08-16-2007, 02:35 PM   #3 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: ATT
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile Won't return AudioPath

As I mentioned the Player object constructed by the code snippet doesn't have an AudioPath control only a Record control, however according to JSR-135 documentation (not RIM) you should be able to reference audio devices by device name when getting a player from the manager such as:

Player p = Manager.createPlayer(“capture://devmic0?encoding=pcm&rate=11025&bits=16&channels=1 ” )

where the audio device is 'devmic0' , when I run this code on the BB it seems to not matter what I specify as the device name, the app always uses the default device. Does anyone know if you can access named devices on the BB when creating a player,?if so what is the naming convention of the devices. I'd like to be able to costruct a player for recording where I can choose which audio device I use, handset , headset etc. Thanks for any ideas on this!
Offline  




Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.