This sketch demonstrates how to use the removeListener method of a Recordable class.
The class used here is AudioPlayer, but you can also remove listeners from AudioInput,
AudioOutput, and AudioSample objects. The class defined in waveform.pde implements
the AudioListener interface and can therefore be removed as a listener to groove.
The waveform renderer starts off not added to the player, so you will initially not see any waveforms drawn.
Press 'a' to add the waveform renderer to the player.
Press 'r' to remove the waveform renderer from the player.
You'll see that when you remove the waveform renderer as a listener of the player, the waveform freezes. This is
because the waveform is drawing the last buffer of samples that it received from the player.
Source code: removeListener waveform
Built with Processing