mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
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
546bcf3f2f.
This commit is contained in:
parent
8fb63dd6e4
commit
9b4332eca4
1 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue