aboutsummaryrefslogtreecommitdiffhomepage
path: root/libaf/af_gate.c
diff options
context:
space:
mode:
authorGravatar diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 02:58:57 +0000
committerGravatar diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 02:58:57 +0000
commit6e9cbdc10448203e7c8b2de41447442fcc9f7bae (patch)
tree0ed465592509105fdbeab27fc12ddbb2e3590aa5 /libaf/af_gate.c
parenteafe5b7517bbf408ae1ffc936a3abe2313c3b334 (diff)
whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libaf/af_gate.c')
-rw-r--r--libaf/af_gate.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libaf/af_gate.c b/libaf/af_gate.c
index 26c7e8ad03..38db9ff055 100644
--- a/libaf/af_gate.c
+++ b/libaf/af_gate.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <string.h>
#include <inttypes.h>
#include <math.h>
@@ -43,19 +43,19 @@ typedef struct af_gate_s
// Initialization and runtime control
static int control(struct af_instance_s* af, int cmd, void* arg)
{
- af_gate_t* s = (af_gate_t*)af->setup;
+ af_gate_t* s = (af_gate_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 = ((af_data_t*)arg)->nch;
af->data->format = AF_FORMAT_FLOAT_NE;
af->data->bps = 4;
// Time constant set to 0.1s
- // s->alpha = (1.0/0.2)/(2.0*M_PI*(float)((af_data_t*)arg)->rate);
+ // s->alpha = (1.0/0.2)/(2.0*M_PI*(float)((af_data_t*)arg)->rate);
return af_test_output(af,(af_data_t*)arg);
case AF_CONTROL_COMMAND_LINE:{
/* float v=-10.0; */
@@ -75,10 +75,10 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
case AF_CONTROL_GATE_ON_OFF | AF_CONTROL_SET:
memcpy(s->enable,(int*)arg,AF_NCH*sizeof(int));
- return AF_OK;
+ return AF_OK;
case AF_CONTROL_GATE_ON_OFF | AF_CONTROL_GET:
memcpy((int*)arg,s->enable,AF_NCH*sizeof(int));
- return AF_OK;
+ return AF_OK;
case AF_CONTROL_GATE_THRESH | AF_CONTROL_SET:
return af_from_dB(AF_NCH,(float*)arg,s->tresh,20.0,-60.0,-1.0);
case AF_CONTROL_GATE_THRESH | AF_CONTROL_GET:
@@ -99,7 +99,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)
@@ -116,7 +116,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
float* a = (float*)c->audio; // Audio data
int len = c->len/4; // Number of samples
int ch = 0; // Channel counter
- register int nch = c->nch; // Number of channels
+ register int nch = c->nch; // Number of channels
register int i = 0;
@@ -126,8 +126,8 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
float t = 1.0 - s->time[ch];
for(i=ch;i<len;i+=nch){
register float x = a[i];
- register float pow = x*x;
- s->pow[ch] = t*s->pow[ch] +
+ register float pow = x*x;
+ s->pow[ch] = t*s->pow[ch] +
pow*s->time[ch]; // LP filter
if(pow < s->pow[ch]){
;