diff options
author | wm4 <wm4@nowhere> | 2013-04-05 20:39:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-12 21:24:54 +0200 |
commit | 7971bb87cb46f90152913de6ac673ae3bd1637a3 (patch) | |
tree | 7929e829c5960425270f4f0c017d84c37872ac5b /audio/filter/af_hrtf.c | |
parent | f7a427676c0fe3c12509e3d9a243301f93626b0a (diff) | |
download | mpv-7971bb87cb46f90152913de6ac673ae3bd1637a3.tar.bz2 mpv-7971bb87cb46f90152913de6ac673ae3bd1637a3.tar.xz |
af: use mp_chmap for mp_audio, include channel map in format negotiation
Now af_lavrresample pretends to reorder the channels, although it
doesn't yet, and nothing sets non-standard layouts either.
Diffstat (limited to 'audio/filter/af_hrtf.c')
-rw-r--r-- | audio/filter/af_hrtf.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/audio/filter/af_hrtf.c b/audio/filter/af_hrtf.c index 1e3244e2eb..85e6477b31 100644 --- a/audio/filter/af_hrtf.c +++ b/audio/filter/af_hrtf.c @@ -31,8 +31,6 @@ #include "af.h" #include "dsp.h" -#include "audio/reorder_ch.h" - /* HRTF filter coefficients and adjustable parameters */ #include "af_hrtf.h" @@ -301,7 +299,7 @@ static int control(struct af_instance *af, int cmd, void* arg) af->data->rate); return AF_ERROR; } - mp_audio_set_num_channels(af->data, ((struct mp_audio*)arg)->nch); + mp_audio_set_channels_old(af->data, ((struct mp_audio*)arg)->nch); if(af->data->nch == 2) { /* 2 channel input */ if(s->decode_mode != HRTF_MIX_MATRIX2CH) { @@ -310,7 +308,7 @@ static int control(struct af_instance *af, int cmd, void* arg) } } else if (af->data->nch < 5) - mp_audio_set_num_channels(af->data, 5); + mp_audio_set_channels_old(af->data, 5); mp_audio_set_format(af->data, AF_FORMAT_S16_NE); test_output_res = af_test_output(af, (struct mp_audio*)arg); af->mul = 2.0 / af->data->nch; @@ -391,12 +389,6 @@ static struct mp_audio* play(struct af_instance *af, struct mp_audio *data) float common, left, right, diff, left_b, right_b; const int dblen = s->dlbuflen, hlen = s->hrflen, blen = s->basslen; - // This was written against the old mplayer channel order, which was ALSA. - // Feel free to fix the otuput code below to output proper order. - reorder_channel_nch(data->audio, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, - AF_CHANNEL_LAYOUT_ALSA_DEFAULT, - data->nch, data->len / data->bps, data->bps); - if(AF_OK != RESIZE_LOCAL_BUFFER(af, data)) return NULL; |