summaryrefslogtreecommitdiffstats
path: root/gst/cutter/filter.func
blob: bdbe5663fa5a6e30bcfe9d956cbc920c369cc149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  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);
}