lib/alsa/NonBlock: throw exception on error
Avoid another potential deadlock: if no file descriptors are registered, our non-blocking ALSA code cannot ever work.
This commit is contained in:
@@ -815,7 +815,13 @@ AlsaOutput::PrepareSockets() noexcept
|
||||
return std::chrono::steady_clock::duration(-1);
|
||||
}
|
||||
|
||||
return PrepareAlsaPcmSockets(*this, pcm, pfd_buffer);
|
||||
try {
|
||||
return PrepareAlsaPcmSockets(*this, pcm, pfd_buffer);
|
||||
} catch (...) {
|
||||
ClearSocketList();
|
||||
LockCaughtError();
|
||||
return std::chrono::steady_clock::duration(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user