diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-12-18 20:26:28 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-12-18 20:26:28 +0000 |
commit | b7fa147ee8020c0124f82353a2386877305bcb1f (patch) | |
tree | 24bc299f49d9d0edc93e941b75e3ed1ff0d4b1d3 | |
parent | e858d98f4f6980cb07cae6166d3f85ba86a46963 (diff) | |
download | mpv-b7fa147ee8020c0124f82353a2386877305bcb1f.tar.bz2 mpv-b7fa147ee8020c0124f82353a2386877305bcb1f.tar.xz |
Allow pulseaudio to restore the previous volume on init instead of forcing to
full volume.
The old behaviour can be restored by using -volume 100.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30061 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_pulse.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c index f113548c1e..25a3a77941 100644 --- a/libao2/ao_pulse.c +++ b/libao2/ao_pulse.c @@ -141,7 +141,6 @@ static int init(int rate_hz, int channels, int format, int flags) { char *host = NULL; char *sink = NULL; char *version = pa_get_library_version(); - struct pa_cvolume volume; if (ao_subdevice) { devarg = strdup(ao_subdevice); @@ -187,8 +186,6 @@ static int init(int rate_hz, int channels, int format, int flags) { pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA); ao_data.bps = pa_bytes_per_second(&ss); - pa_cvolume_reset(&volume, ss.channels); - if (!(mainloop = pa_threaded_mainloop_new())) { mp_msg(MSGT_AO, MSGL_ERR, "AO: [pulse] Failed to allocate main loop\n"); goto fail; @@ -222,7 +219,7 @@ static int init(int rate_hz, int channels, int format, int flags) { pa_stream_set_write_callback(stream, stream_request_cb, NULL); pa_stream_set_latency_update_callback(stream, stream_latency_update_cb, NULL); - if (pa_stream_connect_playback(stream, sink, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, &volume, NULL) < 0) + if (pa_stream_connect_playback(stream, sink, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) goto unlock_and_fail; /* Wait until the stream is ready */ |