[MPlayer-dev-eng] [PATCH] making coreaudio ao remember the volume in a playlist

Tim Wojtulewicz timwoj at ieee.org
Mon Dec 21 03:49:17 CET 2009


On Dec 20, 2009, at 12:22 PM, Stefano Pigozzi wrote:

> This patch makes the coreaudio audio output remember the volume when
> changing audio unit. This is particularly handy when playing a playlist, or
> using ordered chapters unofficial patches: without the patch the coreaudio
> ao will change the volume to 1/4 of the maximum (thats the coreaudio ao
> default) each time a new file in the playlist starts.
> 
> The volume is saved in a static variable before the audio unit
> uninitialization and restored just after the initialization of a new one.
> 
> This is my first patch on mplayer so, please, bear with me if did not
> respect some conventions, just let me know and I will fix the problems.
> Moreover, I'm not really sure if this solution is really the most elegant
> (probably not).
> <coreaudio_remember_volume_on_audio_unit_change.diff>

Does this also make it remember the mute state?  That's another thing I've been meaning to do with ao_coreaudio for a while.  mplayer remembers that the mute button was pressed, but it doesn't actually mute when it switches to the next file.  If you were muted in the first file and press 'm' after it switches to the next file, the OSD will say "Mute: disabled" even though audio is playing.

Tim


More information about the MPlayer-dev-eng mailing list