diff options
author | wm4 <wm4@nowhere> | 2013-11-12 23:42:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-12 23:42:04 +0100 |
commit | e4bbb1d348dafbb32722f413648006a7bd9d0897 (patch) | |
tree | 7165ed9f86a77b751187600d0a9de8b35416f380 /audio/filter/af_karaoke.c | |
parent | e4f2fcc0ecd31322df65141edf0ddbff9c075f5d (diff) | |
parent | 22b3f522cacfbdba76d311c86efd6091512eb089 (diff) | |
download | mpv-e4bbb1d348dafbb32722f413648006a7bd9d0897.tar.bz2 mpv-e4bbb1d348dafbb32722f413648006a7bd9d0897.tar.xz |
Merge branch 'planar_audio'
Conflicts:
audio/out/ao_lavc.c
Diffstat (limited to 'audio/filter/af_karaoke.c')
-rw-r--r-- | audio/filter/af_karaoke.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/audio/filter/af_karaoke.c b/audio/filter/af_karaoke.c index b24ba0d877..8c633b136c 100644 --- a/audio/filter/af_karaoke.c +++ b/audio/filter/af_karaoke.c @@ -41,19 +41,13 @@ static int control(struct af_instance* af, int cmd, void* arg) return AF_UNKNOWN; } -// Deallocate memory -static void uninit(struct af_instance* af) -{ - free(af->data); -} - // Filter data through filter static struct mp_audio* play(struct af_instance* af, struct mp_audio* data) { struct mp_audio* c = data; // Current working data - float* a = c->audio; // Audio data - int len = c->len/4; // Number of samples in current audio block + float* a = c->planes[0]; // Audio data int nch = c->nch; // Number of channels + int len = c->samples*nch; // Number of samples in current audio block register int i; /* @@ -74,14 +68,7 @@ static struct mp_audio* play(struct af_instance* af, struct mp_audio* data) // Allocate memory and set function pointers static int af_open(struct af_instance* af){ af->control = control; - af->uninit = uninit; af->play = play; - af->mul = 1; - af->data = calloc(1,sizeof(struct mp_audio)); - - if(af->data == NULL) - return AF_ERROR; - return AF_OK; } |