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:
parent
58b8398aa0
commit
9a049de859
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user