Simple volume meter

I whipped this app up to show a basic volume meter on live audio input. It does both clip detection and RMS volume.

A "volume" meter can mean many things; if you want to do clip detection, you really need to access every sample. If you don't need clip detection, I might suggest using an Analyser and getByteTimeDomainData, since it will likely have lower CPU overhead. Note that it is CRITICALLY IMPORTANT to disassociate visual rendering (in the requestAnimationFrame loop) from the onaudioprocess function - you do NOT want to trigger a relayout from inside your audio handler, or it may glitch or cause other issues.

It's also hosted at https://webaudiodemos.appspot.com/volume-meter/.

Check it out, feel free to fork, submit pull requests, etc. MIT-Licensed - party on.

-Chris



Simple volume meter

我鞭打这个应用程序,以显示现场音频输入的基本音量计。它同时进行剪辑检测和RMS音量。

体积表可以意味着很多事情;如果你想做剪辑检测,你真的需要访问每个样本。如果不需要剪辑检测,我可能建议使用Analyzer和getByteTimeDomainData,因为它可能会降低CPU开销。请注意,从onaudioprocess函数中取消关联可视化渲染(在requestAnimationFrame循环中)是非常重要的 - 您不希望从音频处理程序内部触发重新发送,否则可能会导致其他问题。

它还托管在 https://webaudiodemos.appspot.com/volume-meter/

检查出来,随意分叉,提交请求等。MIT - 许可 - 派对。

-Chris




相关问题推荐