Skip to main content
Participant
November 25, 2011
Question

Is there any way to get volume level of netStream?

  • November 25, 2011
  • 1 reply
  • 4227 views

Hello,

I want to get the activity level of audio of a NetStream, similar to how you can do it with a Microphone.

In this article,

http://stackoverflow.com/questions/1442913/as3-audio-activity-level-of-a-netstream

NetStreamInfo.audioBytesPerSecond is said to be the solution.

However, audioBytesPerSecond indicates how many data volume the stream have.

It does not get volume level of the stream.

It is not the same as microphone.activityLevel.

Is there any way to get volume level of netStream?

Thanks in advance.

This topic has been closed for replies.

1 reply

November 27, 2011

You can't get an actual volume, but audioBytesPerSecond should be pretty similar to activityLevel. If the bytes per second is very low, then there's not much activity - or the input is low. If the bytes per second is high the corresponding 'activity' would also be high. Seems to correlate well. You just want to poll the stream every 500ms or something to get an accurate representation.

Yuma_N1Author
Participant
December 15, 2011

Thank you very much for your answer.

I will use audioBytesPerSecond.

I've tried SoundMixer class also, but it seems not working on streaming movies.