Is there a way to get the netStream volume level in ActionScript 3?

I want to get the NetStream sound activity level, similar to how you can do it with a microphone. In this article, AS3: Audio Activity Level in NetStream NetStreamInfo.audioBytesPerSecond is considered a solution. However, audioBytesPerSecond indicates how much data the stream has. It does not reach the volume level of the stream. This is not the same as microphone.activityLevel.

Is there any way to get netStream volume level?

+4
source share
2 answers

Edit: It seems that you are looking for a sound spectrum, not a volume level. SoundMixer class is a method called computeSpectrum that populates a ByteArray instance with raw audio data in one go. You can read about SoundMixer here: http://help.adobe.com/en_US/air/reference/html/flash/media/SoundMixer.html And here is an example with source code that will help you achieve your goal: http: / /www.todaycreate.com/2007/02/18/actionscript-3-spectrum-analyzer

NetStream has a soundTransform property that refers to a soundTransform object, which in turn has a volume property to get and set the volume level. Is this what you are looking for?

0
source

Finally, I found a way to get SoundMixer.computeSpectrum streaming movie. I did this with Wowza Media Server and flash 10.1. How to do; http://www.wowza.com/forums/showthread.php?7055-Example-of-how-to-use-ComputeSpectrum-with-Wowza-Pro

The next line was critical (on page 2) ns.bufferTime = 3;

0
source

Source: https://habr.com/ru/post/1383069/


All Articles