[MPlayer-dev-eng] [PATCH] liba52 float stuff again

Zoltan Hidvegi mplayer at hzoli.2y.net
Wed Feb 23 22:03:22 CET 2005


OK, here is an other cleaner attempt on float output support from
liba52.  The -a52float mplayer option is gone, float output must be
requested by -af-adv force=4, and it would work for all ad_ modules
which implement ADCTRL_QUERY_FORMAT and reports that it supports
AF_FORMAT_FLOAT_NE.  ADCTRL_QUERY_FORMAT was defined in ad.h but it
hasn't been used anywhere bofore.  I've modified dec_audio.c, if
-af-adv force=4 is used, it calls ad->control(... ADCTRL_QUERY_FORMAT
...) before ad->preinit and if it reports float support, it sets the
sample_format and samplesize before calling preinit.

I've also added ADCTRL_SET_VOLUME support to liba52, which is
inaccessible now, but perhaps later mixer.c could be changed to use
it.  And in preparation for that, I've added an ad_driver member into
sh_audio_t, and I have removed the file-global mpadec variable from
dec_audio.c in favor of sh_audio->ad_driver.  This at least makes the
ad driver available outside dec_audio.c, but mixer.c still cannot use
it because it does not see sh_audio.  A simple solution is to add an
ad_driver member to mixer_t, and use that.

Zoli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: a52float.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050223/be498ca8/attachment.txt>


More information about the MPlayer-dev-eng mailing list