From 22138d000c7ec7a4f18586bc922b4d98ed407abf Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 16 Mar 2014 17:17:14 -0400 Subject: [PATCH] Calculate a proper value for the sample buffer (48000 Hz * 2 bytes per sample * 2.5 ms) --- jni/nv_opus_dec/nv_opus_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jni/nv_opus_dec/nv_opus_dec.c b/jni/nv_opus_dec/nv_opus_dec.c index baf7b3e..f594d69 100644 --- a/jni/nv_opus_dec/nv_opus_dec.c +++ b/jni/nv_opus_dec/nv_opus_dec.c @@ -38,9 +38,9 @@ int nv_opus_get_channel_count(void) { return 2; } -// This number assumes 2 channels at 48 KHz +// This number assumes 2 channels with 16-bit samples at 48 KHz with 2.5 ms frames int nv_opus_get_max_out_shorts(void) { - return 512*nv_opus_get_channel_count(); + return 240*nv_opus_get_channel_count(); } // The Opus stream is 48 KHz