aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2022-02-24 14:58:20 +1300
committerMatthew Gregan <[email protected]>2022-02-28 23:38:46 +1300
commit3a04ed2946e796a15bd37d1900be42244d685bbf (patch)
tree8a68afdef19d522b9ab82ba0b42e32e5d858cd76
parent2fb20f7b9ca2c3a05331fa720f12ae95ce2e8bad (diff)
downloadcubeb-3a04ed2946e796a15bd37d1900be42244d685bbf.tar.gz
cubeb-3a04ed2946e796a15bd37d1900be42244d685bbf.zip
wasapi: Avoid configuring output side of resampler when using dummy_output.
Possible fix for test_loopback assertion failure.
-rw-r--r--src/cubeb_wasapi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cubeb_wasapi.cpp b/src/cubeb_wasapi.cpp
index 861ca5a..9e7026a 100644
--- a/src/cubeb_wasapi.cpp
+++ b/src/cubeb_wasapi.cpp
@@ -2499,8 +2499,8 @@ setup_wasapi_stream(cubeb_stream * stm)
stm->resampler.reset(cubeb_resampler_create(
stm, has_input(stm) ? &input_params : nullptr,
- has_output(stm) ? &output_params : nullptr, target_sample_rate,
- stm->data_callback, stm->user_ptr,
+ has_output(stm) && !stm->has_dummy_output ? &output_params : nullptr,
+ target_sample_rate, stm->data_callback, stm->user_ptr,
stm->voice ? CUBEB_RESAMPLER_QUALITY_VOIP
: CUBEB_RESAMPLER_QUALITY_DESKTOP));
if (!stm->resampler) {