diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-11-01 12:00:00 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-11-02 19:19:28 +0100 |
commit | 0374ddb79d4e20aa73ef91496beb2c0811c34ca7 (patch) | |
tree | c9066550112a2b905c2e87351c10bd484ebe04ba /libaf/af_surround.c | |
parent | e0aef8cf1275cc988007fcb2a099cdd9f92fa374 (diff) | |
download | mpv-0374ddb79d4e20aa73ef91496beb2c0811c34ca7.tar.bz2 mpv-0374ddb79d4e20aa73ef91496beb2c0811c34ca7.tar.xz |
audio: untypedef af_data and rename it to mp_audio
this is to have something specular to mp_image
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; |