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:
Andreas Pehrson 2024-07-04 22:09:12 +02:00 коммит произвёл Matthew Gregan
Родитель 5d5008d25c
Коммит 89573c99c7
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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",