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_format.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_format.c')
-rw-r--r-- | libaf/af_format.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libaf/af_format.c b/libaf/af_format.c index ea9f39e2e6..a9d1fe6c88 100644 --- a/libaf/af_format.c +++ b/libaf/af_format.c @@ -52,10 +52,10 @@ static void float2int(float* in, void* out, int len, int bps); // From signed int to float static void int2float(void* in, float* out, int len, int bps); -static af_data_t* play(struct af_instance_s* af, af_data_t* data); -static af_data_t* play_swapendian(struct af_instance_s* af, af_data_t* data); -static af_data_t* play_float_s16(struct af_instance_s* af, af_data_t* data); -static af_data_t* play_s16_float(struct af_instance_s* af, af_data_t* data); +static struct mp_audio* play(struct af_instance_s* af, struct mp_audio* data); +static struct mp_audio* play_swapendian(struct af_instance_s* af, struct mp_audio* data); +static struct mp_audio* play_float_s16(struct af_instance_s* af, struct mp_audio* data); +static struct mp_audio* play_s16_float(struct af_instance_s* af, struct mp_audio* data); // Helper functions to check sanity for input arguments @@ -92,7 +92,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg) case AF_CONTROL_REINIT:{ char buf1[256]; char buf2[256]; - af_data_t *data = arg; + struct mp_audio *data = arg; // Make sure this filter isn't redundant if(af->data->format == data->format && @@ -176,10 +176,10 @@ static void uninit(struct af_instance_s* af) af->setup = 0; } -static af_data_t* play_swapendian(struct af_instance_s* af, af_data_t* data) +static struct mp_audio* play_swapendian(struct af_instance_s* af, struct mp_audio* data) { - af_data_t* l = af->data; // Local data - af_data_t* c = data; // Current working data + struct mp_audio* l = af->data; // Local data + struct mp_audio* c = data; // Current working data int len = c->len/c->bps; // Length in samples of current audio block if(AF_OK != RESIZE_LOCAL_BUFFER(af,data)) @@ -193,10 +193,10 @@ static af_data_t* play_swapendian(struct af_instance_s* af, af_data_t* data) return c; } -static af_data_t* play_float_s16(struct af_instance_s* af, af_data_t* data) +static struct mp_audio* play_float_s16(struct af_instance_s* af, struct mp_audio* data) { - af_data_t* l = af->data; // Local data - af_data_t* c = data; // Current working data + struct mp_audio* l = af->data; // Local data + struct mp_audio* c = data; // Current working data int len = c->len/4; // Length in samples of current audio block if(AF_OK != RESIZE_LOCAL_BUFFER(af,data)) @@ -212,10 +212,10 @@ static af_data_t* play_float_s16(struct af_instance_s* af, af_data_t* data) return c; } -static af_data_t* play_s16_float(struct af_instance_s* af, af_data_t* data) +static struct mp_audio* play_s16_float(struct af_instance_s* af, struct mp_audio* data) { - af_data_t* l = af->data; // Local data - af_data_t* c = data; // Current working data + struct mp_audio* l = af->data; // Local data + struct mp_audio* c = data; // Current working data int len = c->len/2; // Length in samples of current audio block if(AF_OK != RESIZE_LOCAL_BUFFER(af,data)) @@ -232,10 +232,10 @@ static af_data_t* play_s16_float(struct af_instance_s* af, af_data_t* data) } // 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_data_t* l = af->data; // Local data - af_data_t* c = data; // Current working data + struct mp_audio* l = af->data; // Local data + struct mp_audio* c = data; // Current working data int len = c->len/c->bps; // Length in samples of current audio block if(AF_OK != RESIZE_LOCAL_BUFFER(af,data)) @@ -318,7 +318,7 @@ static int af_open(af_instance_t* af){ af->uninit=uninit; af->play=play; af->mul=1; - af->data=calloc(1,sizeof(af_data_t)); + af->data=calloc(1,sizeof(struct mp_audio)); if(af->data == NULL) return AF_ERROR; return AF_OK; |