summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_surround.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter/af_surround.c')
-rw-r--r--audio/filter/af_surround.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/audio/filter/af_surround.c b/audio/filter/af_surround.c
index 9cabeedf9d..06a8c4a761 100644
--- a/audio/filter/af_surround.c
+++ b/audio/filter/af_surround.c
@@ -76,13 +76,13 @@ typedef struct af_surround_s
{
float lq[2*L]; // Circular queue for filtering left rear channel
float rq[2*L]; // Circular queue for filtering right rear channel
- float w[L]; // FIR filter coefficients for surround sound 7kHz low-pass
- float* dr; // Delay queue right rear channel
- float* dl; // Delay queue left rear channel
- float d; // Delay time
- int i; // Position in circular buffer
- int wi; // Write index for delay queue
- int ri; // Read index for delay queue
+ float w[L]; // FIR filter coefficients for surround sound 7kHz low-pass
+ float* dr; // Delay queue right rear channel
+ float* dl; // Delay queue left rear channel
+ float d; // Delay time
+ int i; // Position in circular buffer
+ int wi; // Write index for delay queue
+ int ri; // Read index for delay queue
}af_surround_t;
// Initialization and runtime control
@@ -132,10 +132,10 @@ static int control(struct af_instance* af, int cmd, void* arg)
// The beginnings of an active matrix...
static float steering_matrix[][12] = {
-// LL RL LR RR LS RS
-// LLs RLs LRs RRs LC RC
- {.707, .0, .0, .707, .5, -.5,
- .5878, -.3928, .3928, -.5878, .5, .5},
+// LL RL LR RR LS RS
+// LLs RLs LRs RRs LC RC
+ {.707, .0, .0, .707, .5, -.5,
+ .5878, -.3928, .3928, -.5878, .5, .5},
};
// Experimental moving average dominance
@@ -144,13 +144,13 @@ static float steering_matrix[][12] = {
// Filter data through filter
static int filter(struct af_instance* af, struct mp_audio* data, int flags){
af_surround_t* s = (af_surround_t*)af->priv;
- float* m = steering_matrix[0];
- float* in = data->planes[0]; // Input audio data
- float* out = NULL; // Output audio data
- float* end = in + data->samples * data->nch;
- int i = s->i; // Filter queue index
- int ri = s->ri; // Read index for delay queue
- int wi = s->wi; // Write index for delay queue
+ float* m = steering_matrix[0];
+ float* in = data->planes[0]; // Input audio data
+ float* out = NULL; // Output audio data
+ float* end = in + data->samples * data->nch;
+ int i = s->i; // Filter queue index
+ int ri = s->ri; // Read index for delay queue
+ int wi = s->wi; // Write index for delay queue
mp_audio_realloc_min(af->data, data->samples);