[MPlayer-cvslog] r21820 - trunk/mplayer.c

Uoti Urpala uoti.urpala at pp1.inet.fi
Thu Jan 4 22:00:53 CET 2007


On Thu, 2007-01-04 at 17:30 +0100, ben wrote:
> restore volume if muted at exit

> @@ -669,6 +674,7 @@
>    if(mask&INITED_AO){
>      inited_flags&=~INITED_AO;
>      current_module="uninit_ao";
> +    if (user_muted | edl_muted) mixer_mute(&mixer); 
>      audio_out->uninit(eof?0:1); audio_out=NULL;

This is not quite correct. audio_out->uninit() can be called with a
parameter which tells it to block and play queued audio before doing
uninit. The right point to restore volume is after finishing playing
audio but before uninit, but unfortunately this point currently occurs
inside the individual ao drivers. So doing it right needs some more
work, which is why I didn't add this the last time restoring volume was
discussed and a patch similar to this commit was posted.

If you try to restore volume as in this commit the end of audio can get
played at full volume even if mute is active. If you move the mixer_mute
call after uninit() then it calls ao functions after ao uninit.




More information about the MPlayer-cvslog mailing list