check for sio errors

This commit is contained in:
Sébastien Bourdeauducq 2024-12-27 15:14:08 +08:00
parent 4551324940
commit ced16e1338

View File

@ -88,6 +88,12 @@ static void dsp_thread()
std::cout << buf_in[i] << " ";
std::cout << std::endl;
}
if(sio_eof(hdl)) {
std::cerr << "sound I/O error" << std::endl;
sio_close(hdl);
return;
}
}
sio_stop(hdl);