summaryrefslogtreecommitdiff
path: root/src/sink.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sink.cc')
-rw-r--r--src/sink.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sink.cc b/src/sink.cc
index 779dd38..1211b7e 100644
--- a/src/sink.cc
+++ b/src/sink.cc
@@ -45,7 +45,7 @@ int Sink::writeSamples(const char *pcm, size_t size)
{
int rc;
- rc = snd_pcm_writei(handle, pcm, size / sizeof(short));
+ rc = snd_pcm_writei(handle, pcm, size / sizeof(short) / _channels);
if(rc == -EPIPE) {
// EPIPE means overrun
snd_pcm_prepare(handle);