[MPlayer-cvslog] r31121 - in branches/1.0rc3: . libao2/ao_pulse.c

siretart subversion at mplayerhq.hu
Sat May 1 20:41:50 CEST 2010


Author: siretart
Date: Sat May  1 20:41:50 2010
New Revision: 31121

Log:
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.

backport r30061 by reimar

Modified:
   branches/1.0rc3/   (props changed)
   branches/1.0rc3/libao2/ao_pulse.c

Modified: branches/1.0rc3/libao2/ao_pulse.c
==============================================================================
--- branches/1.0rc3/libao2/ao_pulse.c	Sat May  1 20:33:11 2010	(r31120)
+++ branches/1.0rc3/libao2/ao_pulse.c	Sat May  1 20:41:50 2010	(r31121)
@@ -186,8 +186,6 @@ static int init(int rate_hz, int channel
     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;
@@ -221,7 +219,7 @@ static int init(int rate_hz, int channel
     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 */


More information about the MPlayer-cvslog mailing list