Accessing both the mouth and the back microphone of the N1

All your problems with Audio, Video and Images.

Accessing both the mouth and the back microphone of the N1

Postby rumborak » Wed Mar 24, 2010 4:36 pm

Hi all,

first post here. A question: Does anyone know whether it is possible to access both the mouth mic and the back-of-the-phone mic of the Nexus One independently? I know the noise cancellation chip for phone calls does so, but any subsequent call to AudioRecord throws a "device busy" error, (potentially) indicating that the noise cancellation chip has its own dedicated pathway to the mics, whereas programatically you can only access one or the other.

Another good option of course would be if it was possible to retrieve a stereo stream, but have one mic on the left channel, and the other mic on the right. I read on some web pages that there's some mixing going on in the AudioFlinger layer, but it seems the AudioManager API doesn't allow for complex mixing.

Any ideas on how to approach this problem?

Thanks,
rumborak
rumborak
Freshman
Freshman
 
Posts: 2
Joined: Wed Mar 24, 2010 4:10 pm

Top

Postby stealthcopter » Tue Mar 30, 2010 4:27 pm

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. // Set media source to default
  3.  
  4. MediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
  5.  
  6.  
  7.  
  8. // Set media source to the microphone
  9.  
  10. MediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  11.  
  12.  
  13.  
  14. // Set media source to the microphone that faces same way as the camera (if available)
  15.  
  16. MediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
  17.  
  18.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


Source:
MediaRecorder.AudioSource
stealthcopter
Junior Developer
Junior Developer
 
Posts: 12
Joined: Sun Jan 17, 2010 11:42 am

Postby rumborak » Mon Apr 05, 2010 5:28 pm

Hi stealthcopter,

thanks for the reply. THing is, I know that part of the API and tried it. The problem arises when trying to access both *simultaneously*. You always get a "device busy" when trying to access the second device.

rumborak
rumborak
Freshman
Freshman
 
Posts: 2
Joined: Wed Mar 24, 2010 4:10 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 13 guests