[pulseaudio-commits] src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Jun 11 02:34:00 PDT 2012


 src/pulsecore/protocol-native.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 9b4332eca47eb1d1750071e6f3fe99b75029f172
Author: Tanu Kaskinen <tanu.kaskinen at digia.com>
Date:   Thu Apr 5 16:24:48 2012 +0300

    native: Don't save device, volume or mute of new streams.
    
    Specifying the volume when creating a new stream is not an
    equivalent act as setting the volume with a volume control
    application. When creating a new stream, stream-restore
    shouldn't save the volume, but when changing the volume,
    then saving it is ok. For example, when I say
    "paplay --volume=10000 somefile.wav", I mean that I want the
    new stream to have volume 10000. I don't mean that also
    future paplay invocations (without the --volume option)
    should have that same volume.
    
    This patch effectively reverts
    546bcf3f2f9711f0d08c21c3b775994844e7e2a2.

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index a698f74..c24254a 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -662,7 +662,7 @@ static record_stream* record_stream_new(
     data.module = c->options->module;
     data.client = c->client;
     if (source)
-        pa_source_output_new_data_set_source(&data, source, TRUE);
+        pa_source_output_new_data_set_source(&data, source, FALSE);
     if (pa_sample_spec_valid(ss))
         pa_source_output_new_data_set_sample_spec(&data, ss);
     if (pa_channel_map_valid(map))
@@ -673,11 +673,11 @@ static record_stream* record_stream_new(
     if (volume) {
         pa_source_output_new_data_set_volume(&data, volume);
         data.volume_is_absolute = !relative_volume;
-        data.save_volume = TRUE;
+        data.save_volume = FALSE;
     }
     if (muted_set) {
         pa_source_output_new_data_set_muted(&data, muted);
-        data.save_muted = TRUE;
+        data.save_muted = FALSE;
     }
     if (peak_detect)
         data.resample_method = PA_RESAMPLER_PEAKS;
@@ -1122,7 +1122,7 @@ static playback_stream* playback_stream_new(
     data.module = c->options->module;
     data.client = c->client;
     if (sink)
-        pa_sink_input_new_data_set_sink(&data, sink, TRUE);
+        pa_sink_input_new_data_set_sink(&data, sink, FALSE);
     if (pa_sample_spec_valid(ss))
         pa_sink_input_new_data_set_sample_spec(&data, ss);
     if (pa_channel_map_valid(map))
@@ -1135,11 +1135,11 @@ static playback_stream* playback_stream_new(
     if (volume) {
         pa_sink_input_new_data_set_volume(&data, volume);
         data.volume_is_absolute = !relative_volume;
-        data.save_volume = TRUE;
+        data.save_volume = FALSE;
     }
     if (muted_set) {
         pa_sink_input_new_data_set_muted(&data, muted);
-        data.save_muted = TRUE;
+        data.save_muted = FALSE;
     }
     data.sync_base = ssync ? ssync->sink_input : NULL;
     data.flags = flags;



More information about the pulseaudio-commits mailing list