зеркало из https://github.com/mozilla/cubeb.git
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:
Родитель
5d5008d25c
Коммит
89573c99c7
|
@ -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",
|
||||
|
|
Загрузка…
Ссылка в новой задаче