summaryrefslogtreecommitdiffstats
path: root/libao2/ao_sdl.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-15 21:01:44 +0100
committerwm4 <wm4@mplayer2.org>2012-01-18 04:21:46 +0100
commit56c1ab1c62e4e35c7b62d2b8143f6e9247f4c96c (patch)
tree9352471dc57887ae3c8feaf01b9c7dd1772066f5 /libao2/ao_sdl.c
parent7187b4914838a302df78aa16c7a80b498f2be51a (diff)
downloadmpv-56c1ab1c62e4e35c7b62d2b8143f6e9247f4c96c.tar.bz2
mpv-56c1ab1c62e4e35c7b62d2b8143f6e9247f4c96c.tar.xz
libao2: try to identify some audio outputs that have persistent volume
The mplayer frontend (specifically, mixer.c) needs to know this. If the audio output doesn't remember the volume across reinitialization, the frontend will restore the volume settings. There is also the assumption that the volume setting isn't global in this case (i.e. changing it won't change the volume of other applications or annoy the user otherwise). None of these changes have been tested. I'm guessing that ESD and NAS do per-connection non-persistent volume settings.
Diffstat (limited to 'libao2/ao_sdl.c')
-rw-r--r--libao2/ao_sdl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index e9ae7298d5..6ff8b83cb3 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -135,6 +135,8 @@ static int init(int rate,int channels,int format,int flags){
/* SDL Audio Specifications */
SDL_AudioSpec aspec, obtained;
+ global_ao->no_persistent_volume = true;
+
/* Allocate ring-buffer memory */
buffer = av_fifo_alloc(BUFFSIZE);