Tag Archives: detect silence

How to detect a sound in just a few lines of code

The basic detection method is just one short line of code (while (= (snd-fetch s) 0)) What this does is to fetch consecutive samples from the sound “s” until a sample is returned with a non-zero value. A word of caution, SND-FETCH is destructive to the audio data. If “s” will be required later in … Continue reading How to detect a sound in just a few lines of code