diff options
author | Andreas Pehrson <[email protected]> | 2024-07-04 22:09:12 +0200 |
---|---|---|
committer | Andreas Pehrson <[email protected]> | 2024-07-04 22:16:18 +0200 |
commit | 714ab57f8f86b19beb98618cc9036b23477488bb (patch) | |
tree | 038713c3d05ec90d5fd2a011bb9a3ef2e7a45417 /src/cubeb_aaudio.cpp | |
parent | 5d5008d25cef5237711b500f7d8a8653942530f1 (diff) | |
download | cubeb-aaudio-reset-params.tar.gz cubeb-aaudio-reset-params.zip |
Reset stream params on initaaudio-reset-params
Without a reset, a duplex stream being reused as an output stream will
open an input stream and provide an input buffer, which is not expected.
Diffstat (limited to 'src/cubeb_aaudio.cpp')
-rw-r--r-- | src/cubeb_aaudio.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cubeb_aaudio.cpp b/src/cubeb_aaudio.cpp index 5f38c43..c9e4a25 100644 --- a/src/cubeb_aaudio.cpp +++ b/src/cubeb_aaudio.cpp @@ -1293,10 +1293,14 @@ aaudio_stream_init(cubeb * ctx, cubeb_stream ** stream, if (output_stream_params) { stm->output_stream_params = std::make_unique<cubeb_stream_params>(); *(stm->output_stream_params) = *output_stream_params; + } else { + stm->output_stream_params = nullptr; } if (input_stream_params) { stm->input_stream_params = std::make_unique<cubeb_stream_params>(); *(stm->input_stream_params) = *input_stream_params; + } else { + stm->input_stream_params = nullptr; } LOG("cubeb stream prefs: voice_input: %s voice_output: %s", |