esonderegger / web-audio-peak-meter

Customizable peak meters, using the web audio API.
https://esonderegger.github.io/web-audio-peak-meter/
MIT License
125 stars 33 forks source link

Ability to stop/start the meter #42

Closed evoyy closed 1 year ago

evoyy commented 1 year ago

Once the meter is created it runs continuously with no way to stop it, so the paintMeter() function is called forever, even if no audio is playing. I think it would be useful to expose a method to be able to start/stop it. Something like:

myMeter.toggleActive()
esonderegger commented 1 year ago

Addressed in https://github.com/esonderegger/web-audio-peak-meter/pull/50