[MPlayer-dev-eng] [PATCH] Audio plugin to reverse L&R channelsof stereo

Anders Johansson ajh at atri.curtin.edu.au
Mon Mar 25 02:24:10 CET 2002


Hi,

Your plugin should sheck what kind of format the audiodata strem has
during init(), and report error messages if it is not supported. The
most comon format is AFMT_S16_LE, the second most comon is AFMT_U8.
It is enough to make the plugin work for AFMT_S16_LE. I guess you
should ignore mono streams. and swap L/R for 2 and 4 channel ones. 5
and 6 channel streams should have the 4 first swapped pairwise and the
two last unchanged, i.e: 

1 ch: ignore print information message but don't stop.
2 ch: tmp=R; R=L; L=tmp
4 ch: tmp=LR; RF=LF; LF=tmp; tmp=RR; RR=LR; LR=tmp;
5 ch: tmp=LR; RF=LF; LF=tmp; tmp=RR; RR=LR; LR=tmp; ignore 5 channel
6 ch: tmp=LR; RF=LF; LF=tmp; tmp=RR; RR=LR; LR=tmp; ignore 5 and 6 channel

Good luck,
//Anders


> ----- Original Message -----
> From: "Felix Buenemann" <atmosfear at users.sourceforge.net>
> To: <mplayer-dev-eng at mplayer.dev.hu>
> Sent: Saturday, March 23, 2002 4:43 PM
> Subject: Re: [MPlayer-dev-eng] [PATCH] Audio plugin to reverse L&R
> channelsof stereo
> 
>  >From what I've seen, your plugin doesn't check for number of channels
> > (and maybe also samplesize), so you should probably add some case to
> > support at least mono and probably also multichannel sound (4/6
> > channels).
> 
> Hi Atmos,
> 
> thanks for your reply. I only check for AFMT_S16_LE, which is what most
> movies I have are using. I guess AFMT_S16_BE, AFMT_U16_LE and AFMT_U16_BE
> could be done in the same manner, but I have no idea how to handle AC3 and
> mono (what good is this plugin to mono anyway?). Most of the other mplayer
> plugins I saw did just like me (or I did like them, to be precise), so I've
> no idea how to make this better. I'd love to improve it though, so I'd
> appreciate it if you can give me some hints.
> 
> Regards,
> Joro
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng

-- 
______________________________________________________________________
Anders Johansson    Room 314,113  Australian Telecommunications .-_|\
Visiting Research Associate       Research Institute (ATRI)    /     \
telephone:  +61 8 9266 3268       Curtin Uni of Technology     P_.-._/
e-mail: ajh at atri.curtin.edu.au            Bentley WA, 6102.         o
______________________________________________________________________






More information about the MPlayer-dev-eng mailing list