diff options
author | Arun Raghavan <arun@arunraghavan.net> | 2017-09-06 08:34:48 +0530 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2017-09-06 08:34:48 +0530 |
commit | c0a1e51ed28acdacfe88ea058bd88d238189c915 (patch) | |
tree | 11074b086c30a37cfc9ee437c6cb1cda83705417 | |
parent | 9a716afc7c9c9a1892e6b2dfb3802fb0a38b672e (diff) |
WIP sink: Allow switching all sample spec params for passthroughpassthrough-hbr
-rw-r--r-- | src/modules/alsa/alsa-sink.c | 2 | ||||
-rw-r--r-- | src/pulsecore/sink.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 96fd02aec..22de471b4 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -1619,7 +1619,7 @@ static int sink_reconfigure_cb(pa_sink *s, pa_sample_spec *spec, bool passthroug if (!PA_SINK_IS_OPENED(s->state)) { pa_log_info("Updating rate for device %s, new rate is %d", u->device_name, spec->rate); - u->sink->sample_spec.rate = spec->rate; + u->sink->sample_spec = *spec; return 0; } diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 424b25f0d..5ba61448f 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -1455,7 +1455,7 @@ int pa_sink_reconfigure(pa_sink *s, pa_sample_spec *spec, bool passthrough) { if (passthrough) { /* We have to try to use the sink input rate */ - desired_spec.rate = spec->rate; + desired_spec = *spec; } else if (avoid_resampling && (spec->rate >= default_rate || spec->rate >= alternate_rate)) { /* We just try to set the sink input's sample rate if it's not too low */ |