diff options
Diffstat (limited to 'audio/filter/af_pan.c')
-rw-r--r-- | audio/filter/af_pan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/audio/filter/af_pan.c b/audio/filter/af_pan.c index 01b0575ae3..b966deb9b3 100644 --- a/audio/filter/af_pan.c +++ b/audio/filter/af_pan.c @@ -32,7 +32,7 @@ typedef struct af_pan_s { int nch; // Number of output channels; zero means same as input - float level[AF_NCH][AF_NCH]; // Gain level for each channel + float level[AF_NCH][AF_NCH]; // Gain level for each channel char *matrixstr; }af_pan_t; @@ -110,14 +110,14 @@ static int control(struct af_instance* af, int cmd, void* arg) // Filter data through filter static int filter(struct af_instance* af, struct mp_audio* data, int flags) { - struct mp_audio* c = data; // Current working data - struct mp_audio* l = af->data; // Local data - af_pan_t* s = af->priv; // Setup for this instance - float* in = c->planes[0]; // Input audio data - float* out = NULL; // Output audio data - float* end = in+c->samples*c->nch; // End of loop - int nchi = c->nch; // Number of input channels - int ncho = l->nch; // Number of output channels + struct mp_audio* c = data; // Current working data + struct mp_audio* l = af->data; // Local data + af_pan_t* s = af->priv; // Setup for this instance + float* in = c->planes[0]; // Input audio data + float* out = NULL; // Output audio data + float* end = in+c->samples*c->nch; // End of loop + int nchi = c->nch; // Number of input channels + int ncho = l->nch; // Number of output channels register int j,k; mp_audio_realloc_min(af->data, data->samples); @@ -130,7 +130,7 @@ static int filter(struct af_instance* af, struct mp_audio* data, int flags) register float x = 0.0; register float* tin = in; for(k=0;k<nchi;k++) - x += tin[k] * s->level[j][k]; + x += tin[k] * s->level[j][k]; out[j] = x; } out+= ncho; |