aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortinyalsa <simonwilson@google.com>2012-02-14 10:54:41 -0800
committertinyalsa <simonwilson@google.com>2012-02-14 10:54:41 -0800
commite85d8058e83053d640a27d5b9c9ac8544bf5e74f (patch)
tree9e0f732c437cbe6f5fca7251d8a4a6749afc6365
parent43625117cf24ac933819a10c2da7681252042d49 (diff)
parenta6dd4abcbf3007600be621bc886182de7bd2a25d (diff)
Merge pull request #10 from axelcx/tiny-alsa-ti
tinyplay: Use buffer size in bytes instead of frames
-rw-r--r--tinyplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tinyplay.c b/tinyplay.c
index 2251cfe..4d257e7 100644
--- a/tinyplay.c
+++ b/tinyplay.c
@@ -155,7 +155,7 @@ void play_sample(FILE *file, unsigned int card, unsigned int device, unsigned in
return;
}
- size = pcm_get_buffer_size(pcm);
+ size = pcm_frames_to_bytes(pcm, pcm_get_buffer_size(pcm));
buffer = malloc(size);
if (!buffer) {
fprintf(stderr, "Unable to allocate %d bytes\n", size);