diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:26:13 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:34:35 +0300 |
commit | 0eb321bf2c1cc0e048faff26a01f86cdd3ec254f (patch) | |
tree | 71cb9bd9ed121156d3382066c0722c73189afe04 /libaf/af_sinesuppress.c | |
parent | 6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff) | |
download | mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.bz2 mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.xz |
Remove trailing whitespace from most files
Diffstat (limited to 'libaf/af_sinesuppress.c')
-rw-r--r-- | libaf/af_sinesuppress.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libaf/af_sinesuppress.c b/libaf/af_sinesuppress.c index b7ed277d7b..56f6076b5c 100644 --- a/libaf/af_sinesuppress.c +++ b/libaf/af_sinesuppress.c @@ -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 @@ static af_data_t* play_s16(struct af_instance_s* af, af_data_t* data); // 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 @@ static int control(struct af_instance_s* af, int cmd, void* arg) return AF_UNKNOWN; } -// Deallocate memory +// Deallocate memory static void uninit(struct af_instance_s* af) { if(af->data) @@ -111,7 +111,7 @@ static af_data_t* play_s16(struct af_instance_s* af, af_data_t* data) 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 @@ static af_data_t* play_float(struct af_instance_s* af, af_data_t* data) 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); } |