I just found a post which is saying,if we assign gain to 0 then microphone can be muted like below and its working.
microphone = Microphone.getMicrophone();
microphone.gain=0;
Question
Is there any API call which mutes the microphone in Action Script.If not please tell me how to mute the microphone in Action Script. I tried with the following ways
microphone = Microphone.getMicrophone();
microphone.setLoopBack(false); and
microphone.setSilenceLevel(100);
they don't make any difference to me.
Solution
I just found a post which is saying,if we assign gain to 0 then microphone can be muted like below and its working.
microphone = Microphone.getMicrophone();
microphone.gain=0;
OTHER TIPS
The accepted answer will not work very well. Once you set gain
like that, if you would try to set gain
again to some other value other then 0
it will set the gain
, but the sound will not be recorded anymore. (at least to my experience)
To mute you can do it like this:
stream.attachAudio(null);
and to unmute:
stream.attachAudio(mic);