mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-17 01:20:19 +00:00
17 lines
326 B
Text
17 lines
326 B
Text
|
{
|
||
|
guint j;
|
||
|
register double squaresum = 0.0;
|
||
|
|
||
|
/*
|
||
|
* process data here
|
||
|
* input sample data enters in *in_data as 8 or 16 bit data
|
||
|
* samples for left and right channel are interleaved
|
||
|
*/
|
||
|
|
||
|
for (j = 0; j < num_samples; j++)
|
||
|
squaresum += data[j] * data[j];
|
||
|
|
||
|
return (squaresum / (float) num_samples);
|
||
|
}
|
||
|
|