setUseEchoSuppression
(Microphone.setUseEchoSuppression method)
public setUseEchoSuppression(useEchoSuppression:Boolean) : Void
Specifies whether to use the echo suppression feature of the audio codec. The default value is
unless the user has selected Reduce Echo in the Flash Player Microphone Settings
false
panel.
Echo suppression is an effort to reduce the effects of audio feedback, which is caused when
sound going out the speaker is picked up by the microphone on the same computer. (This is
different from echo cancellation, which completely removes the feedback.)
Generally, echo suppression is advisable when the sound being captured is played through
speakers--instead of a headset--on the same computer. If your SWF file allows users to specify
the sound output device, you may want to call
if they indicate they are using speakers and
Microphone.setUseEchoSuppression(true)
will be using the microphone as well.
Users can also adjust these settings in the Flash Player Microphone Settings panel.
Availability: ActionScript 1.0; Flash Player 6
Parameters
- A Boolean value indicating whether echo suppression
useEchoSuppression:Boolean
should be used (
) or not(
).
true
false
Example
The following example turns on echo suppression if the user selects a CheckBox instance
called
. The ProgressBar instance called
useEchoSuppression_ch
activityLevel_pb
displays the current activity level of the audio stream.
var useEchoSuppression_ch:mx.controls.CheckBox;
var activityLevel_pb:mx.controls.ProgressBar;
this.createEmptyMovieClip("sound_mc", this.getNextHighestDepth());
var active_mic:Microphone = Microphone.get();
sound_mc.attachAudio(active_mic);
activityLevel_pb.mode = "manual";
activityLevel_pb.label = "Activity Level: %3";
useEchoSuppression_ch.selected = active_mic.useEchoSuppression;
this.onEnterFrame = function() {
activityLevel_pb.setProgress(active_mic.activityLevel, 100);
};
var chListener:Object = new Object();
chListener.click = function(evt:Object) {
Microphone
801
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?