[MPlayer-dev-eng] [PATCH] Automatic downmix
ubitux
ubitux at gmail.com
Mon Aug 9 23:52:51 CEST 2010
Hi,
Videos with Flac 5.1 audio streams are more and more common, but there is
no automatic downmix in this codec, so a lot of people (me first) expect
issues with headphones…
So here is a small patch to automatically call hrtf filter if needed. I
don't know if it's the correct place to do that but I didn't found a
better place.
Also, hrtf is just as proof of concept; maybe a "pan" audio filter is more
appropriated, but settings need to be discussed (I got a lot of saturation
with hrtf filter).
Well anyway, the patch is attached to the mail, so if anyone can make
review/proposition/etc…
Regards,
--
ubitux
-------------- next part --------------
Index: mplayer.c
===================================================================
--- mplayer.c (revision 31950)
+++ mplayer.c (working copy)
@@ -1706,6 +1706,11 @@
}
mpctx->mixer.audio_out = mpctx->audio_out;
mpctx->mixer.volstep = volstep;
+
+ /* Automatic downmix in case the codec does not implement it */
+ if (audio_output_channels == 2 && mpctx->sh_audio->channels > 2)
+ af_add(mpctx->mixer.afilter, "hrtf");
+
return;
init_error:
More information about the MPlayer-dev-eng
mailing list