Biguas
Biguas

Reputation: 51

Intel INDE - How to control (mute) microphone input volume (input gain) in Android

I'm using Intel INDE for video streaming purposes (Android) and it's giving me headaches to solve some problems.

The main problem is how to mute/unmute the devices microphone in Android.

Looks like Intel INDE is overriding the input volume to be always active. The only way I found is to not set the AudioFormatAndroid of Intel INDE API deleting these lines:

audioFormat = new AudioFormatAndroid("audio/mp4a-latm", 44100, 1);
capture.setTargetAudioFormat(audioFormat);

The problem is that I need to do it during the streaming, not before.

Therefore I tried to manage microphone input settings like:

AudioManager amanager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
amanager.setStreamMute(AudioManager.STREAM_NOTIFICATION, isMuteON);
amanager.setStreamMute(AudioManager.STREAM_ALARM, isMuteON);
amanager.setStreamMute(AudioManager.STREAM_MUSIC, isMuteON);
amanager.setStreamMute(AudioManager.STREAM_RING, isMuteON);

It did not work, so i tried to change Stream Volume, doing this:

amanager.setStreamVolume(AudioManager.STREAM_SYSTEM, 0, AudioManager.FLAG_SHOW_UI);

It shows a Toast stating that I muted the volume, but the audio stream is still active on my streaming.

I´ve searched StackOverflow and google about input gain (microphone volume) and found similar problems but none of them gave me a solution to my problem, can anyone help with this issue?

Upvotes: 2

Views: 297

Answers (0)

Related Questions