721
edits
Line 39: | Line 39: | ||
This is a code snippet that illustrates how to search for the peak in a block of audio samples: | This is a code snippet that illustrates how to search for the peak in a block of audio samples: | ||
<syntaxhighlight lang="c++"> | <syntaxhighlight lang="c++"> | ||
float getPeakOfBlock(){ | float getPeakOfBlock(float* block, int n_smps){ | ||
float peak=0; | float peak=0; | ||
// imagine that the audio block and its length (n_smps) is given to you | // imagine that the audio block and its length (n_smps) is given to you |