mirror of
https://github.com/mozilla/cubeb
synced 2024-11-21 14:29:11 -07:00
Attempt to reinitialize the stream when the error callback is called with AAUDIO_ERROR_TIMEOUT
This can happen when the client side of the AAudio API fails to write all the data to the server side, after the user callback has returned. According to the reporter, this can be hit when a debugger is attached. This fixes #767.
This commit is contained in:
parent
f42ca23add
commit
529c3d2644
1 changed files with 1 additions and 1 deletions
|
@ -931,7 +931,7 @@ aaudio_error_cb(AAudioStream * astream, void * user_data, aaudio_result_t error)
|
|||
assert(stm->ostream == astream || stm->istream == astream);
|
||||
|
||||
// Device change -- reinitialize on the new default device.
|
||||
if (error == AAUDIO_ERROR_DISCONNECTED) {
|
||||
if (error == AAUDIO_ERROR_DISCONNECTED || error == AAUDIO_ERROR_TIMEOUT) {
|
||||
LOG("Audio device change, reinitializing stream");
|
||||
reinitialize_stream(stm);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue