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,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;