]> code.delx.au - pulseaudio/commitdiff
native: Don't save device, volume or mute of new streams.
authorTanu Kaskinen <tanu.kaskinen@digia.com>
Thu, 5 Apr 2012 13:24:48 +0000 (16:24 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 11 Jun 2012 09:32:44 +0000 (12:32 +0300)
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.

src/pulsecore/protocol-native.c

index a698f74a9515672a7766a0a620d363daf84f779a..c24254a59cc73fd4c14168512f4b58bdbca6a999 100644 (file)
@@ -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;