[MPlayer-dev-eng] Save volume over playlist items

Uoti Urpala uoti.urpala at pp1.inet.fi
Thu Apr 5 03:28:28 CEST 2007


On Thu, 2007-04-05 at 01:22 +0200, David Bateman wrote:
> When mplayer finishes one track in a playlist and go to the next, the
> audio chain is reinitialized and if the user changed the volume setting
> from the default, this change is lost. This is very annoying if mplayer
> is being used for example to play a set of mp3s. This patch saves the
> volume at the end of a track in the mpctx structure and restores it just
> before playing the next track.

Whether the change is lost depends on the ao and options. For example
with an internal volume filter it'll be lost whereas ALSA mixer settings
will stay.

What's the point of the code added to uninit_player()? When do you
intend that to be executed?

The audio chain can be reinited during the playback of one file too if
you change audio track. I think restoring volume should be part of
building the audio chain.

It's possible to specify -softvol (which has a separate volume range) as
a per-file option. I don't know why anyone would do that in practice
though so maybe breaking it doesn't matter.




More information about the MPlayer-dev-eng mailing list