summaryrefslogtreecommitdiff
path: root/src/sink.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sink.cc')
-rw-r--r--src/sink.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sink.cc b/src/sink.cc
index d8079a4..1aeef31 100644
--- a/src/sink.cc
+++ b/src/sink.cc
@@ -44,13 +44,14 @@ Sink::~Sink()
int Sink::writeSamples(const char *pcm, size_t size)
{
int rc;
-
+ again:
rc = snd_pcm_writei(handle, pcm, size / sizeof(short) / _channels);
if(rc == -EPIPE) {
// EPIPE means overrun
snd_pcm_prepare(handle);
usleep(1000);
- return 0;//-2;
+ // return 0;//-2;
+ goto again;
} else if (rc < 0) {
return -1; // Read Error
}