mirror of
https://github.com/mozilla/cubeb
synced 2024-11-21 06:26:10 -07:00
Reset stream params on init
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.
This commit is contained in:
parent
5d5008d25c
commit
714ab57f8f
1 changed files with 4 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue