[MPlayer-dev-eng] [PATCH] -srate, -channels etc. should only affect start of filter chain, not ao

Nico Sabbi nsabbi at tiscali.it
Sun Apr 17 23:25:44 CEST 2005


Reimar Döffinger wrote:

>Hi,
>please comment on the attached patch. IMHO the values that are passed to
>the ao should depend on the filter chain... As it is currently e.g.
>mplayer -channels 6 -af channels=2 -ao pcm
>will create a wav file with 6 channels which IMHO is nonsense...
>Look a few lines above for the code that affects the start of the filter
>chain...
>
>Greetings,
>Reimar Döffinger
>  
>
>------------------------------------------------------------------------
>
>Index: mplayer.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/mplayer.c,v
>retrieving revision 1.841
>diff -u -r1.841 mplayer.c
>--- mplayer.c	15 Apr 2005 12:14:24 -0000	1.841
>+++ mplayer.c	17 Apr 2005 21:01:47 -0000
>@@ -2143,9 +2143,9 @@
>   current_module="ao2_init";
>   if(!(audio_out=init_best_audio_out(audio_driver_list,
>       0, // plugin flag
>-      force_srate?force_srate:ao_data.samplerate,
>-      audio_output_channels?audio_output_channels:ao_data.channels,
>-      audio_output_format?audio_output_format:ao_data.format,0))){
>+      ao_data.samplerate,
>+      ao_data.channels,
>+      ao_data.format,0))){
>     // FAILED:
>     mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO);
>     uninit_player(INITED_ACODEC); // close codec
>  
>
>------------------------------------------------------------------------
>
>  
>

this patch + the one related to hrtf make mplayer exactly what I wanted 
to "hear",
although this one has interesting side effects when playing -channels 6 
on a stereo system
(the other channels are totally muted).

Thanks,
   
    Nico




More information about the MPlayer-dev-eng mailing list