Loading include/media/nbaio/NBAIO.h +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ size_t Format_frameSize(const NBAIO_Format& format); size_t Format_frameBitShift(const NBAIO_Format& format); // Convert a sample rate in Hz and channel count to an NBAIO_Format // FIXME The sample format is hard-coded to AUDIO_FORMAT_PCM_16_BIT NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount); // Return the sample rate in Hz of an NBAIO_Format Loading media/libnbaio/NBAIO.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -24,11 +24,13 @@ 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); } size_t 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); } Loading Loading
include/media/nbaio/NBAIO.h +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ size_t Format_frameSize(const NBAIO_Format& format); size_t Format_frameBitShift(const NBAIO_Format& format); // Convert a sample rate in Hz and channel count to an NBAIO_Format // FIXME The sample format is hard-coded to AUDIO_FORMAT_PCM_16_BIT NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount); // Return the sample rate in Hz of an NBAIO_Format Loading
media/libnbaio/NBAIO.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -24,11 +24,13 @@ 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); } size_t 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); } Loading