Commit 9a049de8 authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Max Kellermann

output/sndio: No need to use a loop in Play()

This is a left-over from the previous version of the code that was retrying on EINTR.
parent 58b8398a
......@@ -180,16 +180,10 @@ SndioOutput::Play(const void *chunk, size_t size, Error &error)
{
size_t n;
while (1) {
n = sio_write(sio_hdl, chunk, size);
if (n == 0) {
if (sio_eof(sio_hdl)) {
if (n == 0 && sio_eof(sio_hdl) != 0)
error.Set(sndio_output_domain, -1, "sndio write failed");
return 0;
}
}
return n;
}
}
typedef AudioOutputWrapper<SndioOutput> Wrapper;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment