The Microphone Class Table A.20. Microphone Methods | Name | Format | Description | | get | Microphone.get([ index ]) | Returns a default or specified audio stream, or null if no microphone is available. | | setGain | myMicrophone.setGain( gain ) | Specifies the amount by which the microphone should boost the signal, from to 100 . | | setRate | myMicrophone.setRate( kHz ) | Specifies the rate at which the microphone should capture sound, in kHz. | | setSilenceLevel | myMicrophone.setSilenceLevel( level [, timeout ]) | Specifies the sound level (from to 100 ) required to activate the microphone. Optionally also sets timeout , specifying milliseconds of inactivity before Flash invokes Microphone.onActivity(false) . The default value is 2000 (2 seconds). The default value of level is 10 . | | setUseEchoSuppression | myMicrophone.setUseEchoSuppression ( suppress ) | suppress is a Boolean that specifies whether to use the echo suppression feature of the audio codec. | Table A.21. Microphone Attributes | Format | Description | | myMicrophone.activityLevel | The amount of sound the microphone detects, from to 100 . | | myMicrophone.gain | The amount by which the microphone boosts the signal before transmitting it, from to 100 . The default is 50 . | | myMicrophone.index | The index of the current microphone. | | myMicrophone.muted | A Boolean value that specifies whether the user has allowed or denied access to the microphone. | | myMicrophone.name | The name of the current sound capture device, as returned by the sound capture hardware. | | Microphone. names | A class property, an array of strings containing the names of all available sound capture devices, including sound cards and microphones. | | myMicrophone.rate | The sound capture rate, in kHz. | Table A.22. Microphone Event Handlers | Name | Format | Description | | onActivity | myMicrophone.onActivity = function ( activity ){ } | Invoked when the microphone starts or stops detecting sound. activity is a Boolean value set to true when the microphone starts detecting sound, and false when it stops. | | onStatus | myMicrophone.onStatus = function ( infoObject ){} | Invoked when the user allows or denies access to the microphone. infoObject usage similar to that of Camera.onStatus . | | |