From: Glenn Kasten Date: Thu, 6 Mar 2014 16:23:11 +0000 (-0800) Subject: Re-implement Format_frameSize(), to support non-power-of-2 X-Git-Tag: android-x86-6.0-r1~2377^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=983f0578ccd2928af40c9689f6fe90110d02b92e;p=android-x86%2Fframeworks-av.git Re-implement Format_frameSize(), to support non-power-of-2 Change-Id: I671bd4f03ce70de685770fd7992e2e023133c9b4 --- diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp index cfcd8b445d..16e7df567c 100644 --- a/media/libnbaio/NBAIO.cpp +++ b/media/libnbaio/NBAIO.cpp @@ -24,8 +24,7 @@ namespace android { size_t Format_frameSize(const NBAIO_Format& format) { - // FIXME The sample format is hard-coded to AUDIO_FORMAT_PCM_16_BIT - return Format_channelCount(format) * sizeof(short); + return format.mFrameSize; } int Format_frameBitShift(const NBAIO_Format& format)