Mercurial > mplayer.hg
diff libaf/af_sinesuppress.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 8c706ce21c6f |
children | 8fa2f43cb760 |
line wrap: on
line diff
--- a/libaf/af_sinesuppress.c Tue May 12 19:25:35 2009 +0000 +++ b/libaf/af_sinesuppress.c Wed May 13 02:58:57 2009 +0000 @@ -22,7 +22,7 @@ #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include <string.h> #include <inttypes.h> #include <math.h> @@ -47,13 +47,13 @@ // Initialization and runtime control static int control(struct af_instance_s* af, int cmd, void* arg) { - af_sinesuppress_t* s = (af_sinesuppress_t*)af->setup; + af_sinesuppress_t* s = (af_sinesuppress_t*)af->setup; switch(cmd){ case AF_CONTROL_REINIT:{ // Sanity check if(!arg) return AF_ERROR; - + af->data->rate = ((af_data_t*)arg)->rate; af->data->nch = 1; #if 0 @@ -95,7 +95,7 @@ return AF_UNKNOWN; } -// Deallocate memory +// Deallocate memory static void uninit(struct af_instance_s* af) { if(af->data) @@ -111,7 +111,7 @@ register int i = 0; int16_t *a = (int16_t*)data->audio; // Audio data int len = data->len/2; // Number of samples - + for (i = 0; i < len; i++) { double co= cos(s->pos); @@ -143,14 +143,14 @@ float *a = (float*)data->audio; // Audio data int len = data->len/4; // Number of samples float avg, l, r; - + for (i = 0; i < len; i+=2) { avg = (a[i] + a[i + 1]) / 2; - + /* l = avg + (s->mul * (a[i] - avg)); r = avg + (s->mul * (a[i + 1] - avg));*/ - + a[i] = af_softclip(l); a[i + 1] = af_softclip(r); }