input/alsa: use C++ exceptions instead of class Error
This commit is contained in:
parent
539c0ed171
commit
0fdaca17a2
@ -207,10 +207,8 @@ AlsaInputStream::DispatchSockets()
|
|||||||
while ((n_frames = snd_pcm_readi(capture_handle,
|
while ((n_frames = snd_pcm_readi(capture_handle,
|
||||||
w.data, w_frames)) < 0) {
|
w.data, w_frames)) < 0) {
|
||||||
if (Recover(n_frames) < 0) {
|
if (Recover(n_frames) < 0) {
|
||||||
Error error;
|
postponed_exception = std::make_exception_ptr(std::runtime_error("PCM error - stream aborted"));
|
||||||
error.Format(alsa_input_domain,
|
cond.broadcast();
|
||||||
"PCM error - stream aborted");
|
|
||||||
PostponeError(std::move(error));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user