summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-10-03 12:00:16 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-10-03 12:00:16 +0200
commit8e417cccb983d202fa00782565725bbf98ec4fca (patch)
treeffedca8c6d1b20f6cc08e36483fd8a5a089d4041
parent4b200479437dc5583c242ce70b930dc5165e45ba (diff)
New aiorecord/aioplay stub programs.
-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
}