summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_drc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-13 18:00:51 +0200
committerwm4 <wm4@nowhere>2014-04-13 18:03:01 +0200
commit78128bddda4bcea1f256fc13cc33fa2652ed277c (patch)
tree35bf6596cb8e2d7927618845833c3ee36534f890 /audio/filter/af_drc.c
parent44f382cf98564c0fe08bdc78579c284362cd6f3c (diff)
downloadmpv-78128bddda4bcea1f256fc13cc33fa2652ed277c.tar.bz2
mpv-78128bddda4bcea1f256fc13cc33fa2652ed277c.tar.xz
Kill all tabs
I hate tabs. This replaces all tabs in all source files with spaces. The only exception is old-makefile. The replacement was made by running the GNU coreutils "expand" command on every file. Since the replacement was automatic, it's possible that some formatting was destroyed (but perhaps only if it was assuming that the end of a tab does not correspond to aligning the end to multiples of 8 spaces).
Diffstat (limited to 'audio/filter/af_drc.c')
-rw-r--r--audio/filter/af_drc.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/audio/filter/af_drc.c b/audio/filter/af_drc.c
index fad34ba500..3bcd368d4d 100644
--- a/audio/filter/af_drc.c
+++ b/audio/filter/af_drc.c
@@ -70,8 +70,8 @@ typedef struct af_volume_s
// method 2
int idx;
struct {
- float avg; // average level of the sample
- int len; // sample size (weight)
+ float avg; // average level of the sample
+ int len; // sample size (weight)
} mem[NSAMPLES];
// "Ideal" level
float mid_s16;
@@ -100,8 +100,8 @@ static int control(struct af_instance* af, int cmd, void* arg)
static void method1_int16(af_drc_t *s, struct mp_audio *c)
{
register int i = 0;
- int16_t *data = (int16_t*)c->planes[0]; // Audio data
- int len = c->samples*c->nch; // Number of samples
+ int16_t *data = (int16_t*)c->planes[0]; // Audio data
+ int len = c->samples*c->nch; // Number of samples
float curavg = 0.0, newavg, neededmul;
int tmp;
@@ -142,8 +142,8 @@ static void method1_int16(af_drc_t *s, struct mp_audio *c)
static void method1_float(af_drc_t *s, struct mp_audio *c)
{
register int i = 0;
- float *data = (float*)c->planes[0]; // Audio data
- int len = c->samples*c->nch; // Number of samples
+ float *data = (float*)c->planes[0]; // Audio data
+ int len = c->samples*c->nch; // Number of samples
float curavg = 0.0, newavg, neededmul, tmp;
for (i = 0; i < len; i++)
@@ -179,8 +179,8 @@ static void method1_float(af_drc_t *s, struct mp_audio *c)
static void method2_int16(af_drc_t *s, struct mp_audio *c)
{
register int i = 0;
- int16_t *data = (int16_t*)c->planes[0]; // Audio data
- int len = c->samples*c->nch; // Number of samples
+ int16_t *data = (int16_t*)c->planes[0]; // Audio data
+ int len = c->samples*c->nch; // Number of samples
float curavg = 0.0, newavg, avg = 0.0;
int tmp, totallen = 0;
@@ -204,8 +204,8 @@ static void method2_int16(af_drc_t *s, struct mp_audio *c)
avg /= (float)totallen;
if (avg >= SIL_S16)
{
- s->mul = s->mid_s16 / avg;
- s->mul = MPCLAMP(s->mul, MUL_MIN, MUL_MAX);
+ s->mul = s->mid_s16 / avg;
+ s->mul = MPCLAMP(s->mul, MUL_MIN, MUL_MAX);
}
}
@@ -229,8 +229,8 @@ static void method2_int16(af_drc_t *s, struct mp_audio *c)
static void method2_float(af_drc_t *s, struct mp_audio *c)
{
register int i = 0;
- float *data = (float*)c->planes[0]; // Audio data
- int len = c->samples*c->nch; // Number of samples
+ float *data = (float*)c->planes[0]; // Audio data
+ int len = c->samples*c->nch; // Number of samples
float curavg = 0.0, newavg, avg = 0.0, tmp;
int totallen = 0;
@@ -254,8 +254,8 @@ static void method2_float(af_drc_t *s, struct mp_audio *c)
avg /= (float)totallen;
if (avg >= SIL_FLOAT)
{
- s->mul = s->mid_float / avg;
- s->mul = MPCLAMP(s->mul, MUL_MIN, MUL_MAX);
+ s->mul = s->mid_float / avg;
+ s->mul = MPCLAMP(s->mul, MUL_MIN, MUL_MAX);
}
}
@@ -279,16 +279,16 @@ static int filter(struct af_instance* af, struct mp_audio* data, int flags)
if(af->data->format == (AF_FORMAT_S16))
{
if (s->method == 2)
- method2_int16(s, data);
+ method2_int16(s, data);
else
- method1_int16(s, data);
+ method1_int16(s, data);
}
else if(af->data->format == (AF_FORMAT_FLOAT))
{
if (s->method == 2)
- method2_float(s, data);
+ method2_float(s, data);
else
- method1_float(s, data);
+ method1_float(s, data);
}
return 0;
}