[MPlayer-dev-eng] audio plugin
Anders Johansson
ajh at atri.curtin.edu.au
Wed Nov 28 02:52:55 CET 2001
Hi,
> On Sun, 25 Nov 2001, Anders Johansson wrote:
>
> > Audio plugin interface working, and first plugin created. The plugin
> > is a dummy that only buffers and delays the output signal, but it
> > serves as an easy example of how to write plugins.
>
> Do you think I could use this plugin idea to write a Dolby Surround
> decoder - a simple decoder is just a matter of getting the difference
> between left and right as a "surround" signal. Input would be a stereo
> signal, output 4 channel.
>
> OK - its not a proper "Pro Logic" decoder - which has extra gain riding
> stuff that's not public - but it'll give a basic effect.
>
> Steve
Yes you can do it, I had it on my todo list and the interface is made
such that the plugins can change the samplerate, number of channels,
endinaness, sign/unsigend and number of bits per sample.
Don't forget to notify ao_plugin that it has to half the input buffer
size ( pl_format.sz_mult*=2; in your init() )
Also please make it work with AFMT_S16_LE this is the default format
(there is no RTFM on this yet, but feel free to write it ;). If you
have any questions don't hesitate to contact me. I would be happy to
alpha test the code if you want to. Also make the cmdline generic so
that we can change the number of channels in the future. I was
planning to start with 4 and the extend it to 6 with front and LFE.
By the way I saw a /. comment on this. It is extremely easy to do if
you have the data in AFMT_U16_LE format cause you can do it by binary
bit manipulation (I can't remember which post it was though :(
More information about the MPlayer-dev-eng
mailing list