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

Add toggleActive method #45

Closed evoyy closed 1 year ago

evoyy commented 1 year ago

Added a method toggleActive(). Starts (true) or stops (false) the meter. If no argument provided, inverts the current status.

Relates to issue https://github.com/esonderegger/web-audio-peak-meter/issues/42

esonderegger commented 1 year ago

This functionality has been implemented in the cleanup() function in https://github.com/esonderegger/web-audio-peak-meter/pull/50

For example usage, please see https://esonderegger.github.io/web-audio-peak-meter/examples/cleanup.html and let me know if it does what you need it to do. Thanks for raising this issue!