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.
This commit is contained in:
Dimitris Papastamos 2016-06-23 13:10:03 +01:00 committed by Max Kellermann
parent 58b8398aa0
commit 9a049de859

View File

@ -180,17 +180,11 @@ SndioOutput::Play(const void *chunk, size_t size, Error &error)
{ {
size_t n; size_t n;
while (1) {
n = sio_write(sio_hdl, chunk, size); n = sio_write(sio_hdl, chunk, size);
if (n == 0) { if (n == 0 && sio_eof(sio_hdl) != 0)
if (sio_eof(sio_hdl)) {
error.Set(sndio_output_domain, -1, "sndio write failed"); error.Set(sndio_output_domain, -1, "sndio write failed");
return 0;
}
}
return n; return n;
} }
}
typedef AudioOutputWrapper<SndioOutput> Wrapper; typedef AudioOutputWrapper<SndioOutput> Wrapper;