Chris
Chris

Reputation: 26878

ActionScript/Flex - Stop recording on silence

Is there a way to start recording (writing sample data to a ByteArray) when there's activity (by activity I mean anything but silence), and stop recording when there's one second of silence?

Any guidelines on how to approach this would be extremely appreciated.

(Sorry if part or all of the above sounds stupid, this is my first-ever ActionScript application; I'm building it because I need microphone access in a Web app).

Upvotes: 3

Views: 249

Answers (1)

Pavel Shirobok
Pavel Shirobok

Reputation: 307

in Microphone there is 'silenceLevel' property and 'setSilenceLevel()' method. This method specified microphone signal level after which dispatching activity event. Microphone#setSilenceLevel() method reference

Upvotes: 3

Related Questions