From 4d7b3f876b21997680ae32a340d746ed1cae6ab1 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Fri, 31 Jan 2014 10:38:16 -0800 Subject: Change Format_frameBitShift() API for non-power-of-2 sizes Change-Id: Ie39ff51ab8c403ca9d9898396297efdaa3193588 --- media/libnbaio/NBAIO.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'media/libnbaio') diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp index 26ef8c4..51514de 100644 --- a/media/libnbaio/NBAIO.cpp +++ b/media/libnbaio/NBAIO.cpp @@ -28,11 +28,12 @@ size_t Format_frameSize(const NBAIO_Format& format) return Format_channelCount(format) * sizeof(short); } -size_t Format_frameBitShift(const NBAIO_Format& format) +int Format_frameBitShift(const NBAIO_Format& format) { // FIXME The sample format is hard-coded to AUDIO_FORMAT_PCM_16_BIT // sizeof(short) == 2, so frame size == 1 << channels return Format_channelCount(format); + // FIXME must return -1 for non-power of 2 } const NBAIO_Format Format_Invalid = { 0 }; -- cgit v1.1