aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2020-07-27 20:19:56 +0200
committerPaul Adenot <[email protected]>2020-09-09 14:30:03 +0200
commitbdc2040367fc49a3d7c80a48d77ac180b59231db (patch)
treee6f5dcf9aa0cf6afcfe7bc3776fc45cfc9aa36de
parent68fba2c8a6795d61ea6ff6231320c7ba95b63fd6 (diff)
downloadcubeb-bdc2040367fc49a3d7c80a48d77ac180b59231db.tar.gz
cubeb-bdc2040367fc49a3d7c80a48d77ac180b59231db.zip
Fix the input stream prefs check for deciding if a stream is for voice
-rw-r--r--src/cubeb_wasapi.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cubeb_wasapi.cpp b/src/cubeb_wasapi.cpp
index 9773435..6a7a30f 100644
--- a/src/cubeb_wasapi.cpp
+++ b/src/cubeb_wasapi.cpp
@@ -2356,13 +2356,6 @@ wasapi_stream_init(cubeb * context, cubeb_stream ** stream,
stm->state_callback = state_callback;
stm->user_ptr = user_ptr;
- if (stm->output_stream_params.prefs & CUBEB_STREAM_PREF_VOICE ||
- stm->input_stream_params.prefs & CUBEB_STREAM_PREF_VOICE) {
- stm->voice = true;
- } else {
- stm->voice = false;
- }
-
stm->role = eConsole;
if (input_stream_params) {
@@ -2374,6 +2367,13 @@ wasapi_stream_init(cubeb * context, cubeb_stream ** stream,
stm->output_device_id = utf8_to_wstr(reinterpret_cast<char const *>(output_device));
}
+ if (stm->output_stream_params.prefs & CUBEB_STREAM_PREF_VOICE ||
+ stm->input_stream_params.prefs & CUBEB_STREAM_PREF_VOICE) {
+ stm->voice = true;
+ } else {
+ stm->voice = false;
+ }
+
switch (output_stream_params ? output_stream_params->format : input_stream_params->format) {
case CUBEB_SAMPLE_S16NE:
stm->bytes_per_sample = sizeof(short);