Loading include/media/nbaio/NBAIO.h +2 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ extern const NBAIO_Format Format_Invalid; size_t Format_frameSize(const NBAIO_Format& format); // Return the frame size of an NBAIO_Format as a bit shift size_t Format_frameBitShift(const NBAIO_Format& format); // or -1 if frame size is not a power of 2 int 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 Loading media/libnbaio/NBAIO.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -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 }; Loading Loading
include/media/nbaio/NBAIO.h +2 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ extern const NBAIO_Format Format_Invalid; size_t Format_frameSize(const NBAIO_Format& format); // Return the frame size of an NBAIO_Format as a bit shift size_t Format_frameBitShift(const NBAIO_Format& format); // or -1 if frame size is not a power of 2 int 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 Loading
media/libnbaio/NBAIO.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -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 }; Loading