summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/player.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c
index 6861a9a..d70b63f 100644
--- a/src/player.c
+++ b/src/player.c
@@ -89,8 +89,9 @@ size_t BarPlayerCurlCb (void *ptr, size_t size, size_t nmemb, void *stream) {
NeAACDecGetErrorMessage (frameInfo.error));
break;
}
+ /* ao_play needs bytes: 1 sample = 16 bits = 2 bytes */
ao_play (player->audioOutDevice, aacDecoded,
- frameInfo.samples*frameInfo.channels);
+ frameInfo.samples * 16 / 8);
player->bufferRead += frameInfo.bytesconsumed;
player->sampleSizeCurr++;
/* going through this loop can take up to a few seconds =>