diff options
author | wm4 <wm4@mplayer2.org> | 2012-01-06 16:23:43 +0100 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-01-18 04:21:45 +0100 |
commit | 29effe9593465f9096227edb79e09e51ca8a054d (patch) | |
tree | 5d451166dcaef5cd3c7d707195ca818e5f47f54b /libao2 | |
parent | 95c52f865da2459f47ed708c41324f0cc5386da3 (diff) | |
download | mpv-29effe9593465f9096227edb79e09e51ca8a054d.tar.bz2 mpv-29effe9593465f9096227edb79e09e51ca8a054d.tar.xz |
mixer: restore volume with audio output drivers without persistent volume
Some audio outputs don't provide access to a system-wide mixer control, and
do per-application audio mixing. Further, some of these forget the volume
as soon as the audio device is closed. This can be annoying, because
mplayer will "forget" the volume when playing a new file or when crossing
ordered chapter boundaries. Support restoring the volume on audio
reinitialization if an audio output driver knowingly behaves this way.
(This doesn't change that mplayer never writes any settings into the config
file, including volume settings.)
This commit doesn't yet change any actual output driver to use this code.
Hopefully make some logic in the volume restore code a bit more robust.
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/audio_out.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libao2/audio_out.h b/libao2/audio_out.h index e96e123700..a8efc92069 100644 --- a/libao2/audio_out.h +++ b/libao2/audio_out.h @@ -78,6 +78,7 @@ struct ao { int buffer_playable_size; bool initialized; bool untimed; + bool no_persistent_volume; const struct ao_driver *driver; void *priv; }; |