diff options
Diffstat (limited to 'libaf/af_surround.c')
-rw-r--r-- | libaf/af_surround.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libaf/af_surround.c b/libaf/af_surround.c index 28f69a586e..012c1da9f9 100644 --- a/libaf/af_surround.c +++ b/libaf/af_surround.c @@ -92,8 +92,8 @@ static int control(struct af_instance_s* af, int cmd, void* arg) switch(cmd){ case AF_CONTROL_REINIT:{ float fc; - af->data->rate = ((af_data_t*)arg)->rate; - af->data->nch = ((af_data_t*)arg)->nch*2; + af->data->rate = ((struct mp_audio*)arg)->rate; + af->data->nch = ((struct mp_audio*)arg)->nch*2; af->data->format = AF_FORMAT_FLOAT_NE; af->data->bps = 4; @@ -123,10 +123,10 @@ static int control(struct af_instance_s* af, int cmd, void* arg) // printf("%i\n",s->wi); s->ri = 0; - if((af->data->format != ((af_data_t*)arg)->format) || - (af->data->bps != ((af_data_t*)arg)->bps)){ - ((af_data_t*)arg)->format = af->data->format; - ((af_data_t*)arg)->bps = af->data->bps; + if((af->data->format != ((struct mp_audio*)arg)->format) || + (af->data->bps != ((struct mp_audio*)arg)->bps)){ + ((struct mp_audio*)arg)->format = af->data->format; + ((struct mp_audio*)arg)->bps = af->data->bps; return AF_FALSE; } return AF_OK; @@ -167,7 +167,7 @@ static float steering_matrix[][12] = { //static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0; // Filter data through filter -static af_data_t* play(struct af_instance_s* af, af_data_t* data){ +static struct mp_audio* play(struct af_instance_s* af, struct mp_audio* data){ af_surround_t* s = (af_surround_t*)af->setup; float* m = steering_matrix[0]; float* in = data->audio; // Input audio data @@ -254,7 +254,7 @@ static int af_open(af_instance_t* af){ af->uninit=uninit; af->play=play; af->mul=2; - af->data=calloc(1,sizeof(af_data_t)); + af->data=calloc(1,sizeof(struct mp_audio)); af->setup=calloc(1,sizeof(af_surround_t)); if(af->data == NULL || af->setup == NULL) return AF_ERROR; |