RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

Select mic using prepareAudio

Open invalidtask opened this issue 3 years ago • 1 comments

I'm trying to select mic using prepareAudio but the only result that happens is a sped up sounding voice on playback. I'm using AudioDeviceInfo to get the device id of the microphone and passing that value to the prepareAudio method. Is this not the correct usage? If not, how do I select a different microphone?

invalidtask avatar Jun 18 '22 15:06 invalidtask

Hello,

If you means parameter "int audioSource". This parameter support this values: https://developer.android.com/reference/android/media/MediaRecorder.AudioSource

In most of cases using MediaRecorder.AudioSource.MIC or MediaRecorder.AudioSource.VOICE_COMMUNICATION is enough but if you are using bluetooth microphone enable it using SCO could be necessary: https://developer.android.com/reference/android/media/AudioManager

pedroSG94 avatar Jun 18 '22 17:06 pedroSG94