From c326e1c3d122917462f1cda4f03d9c639ad92902 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Thu, 6 Mar 2014 08:01:38 -0800 Subject: Remove Format_frameBitShift() Change-Id: Iae2e80a7330c5dd0f70a263051aa44c23cfe3541 --- media/libnbaio/AudioStreamInSource.cpp | 1 - media/libnbaio/AudioStreamOutSink.cpp | 1 - media/libnbaio/NBAIO.cpp | 2 ++ media/libnbaio/SourceAudioBufferProvider.cpp | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) (limited to 'media/libnbaio') diff --git a/media/libnbaio/AudioStreamInSource.cpp b/media/libnbaio/AudioStreamInSource.cpp index e2f4943..efbc1a7 100644 --- a/media/libnbaio/AudioStreamInSource.cpp +++ b/media/libnbaio/AudioStreamInSource.cpp @@ -48,7 +48,6 @@ ssize_t AudioStreamInSource::negotiate(const NBAIO_Format offers[], size_t numOf audio_channel_mask_t channelMask = (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); - mBitShift = Format_frameBitShift(mFormat); mFrameSize = Format_frameSize(mFormat); } } diff --git a/media/libnbaio/AudioStreamOutSink.cpp b/media/libnbaio/AudioStreamOutSink.cpp index 442455b..f7f764e 100644 --- a/media/libnbaio/AudioStreamOutSink.cpp +++ b/media/libnbaio/AudioStreamOutSink.cpp @@ -45,7 +45,6 @@ ssize_t AudioStreamOutSink::negotiate(const NBAIO_Format offers[], size_t numOff audio_channel_mask_t channelMask = (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); - mBitShift = Format_frameBitShift(mFormat); mFrameSize = Format_frameSize(mFormat); } } diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp index 16e7df5..4f6591d 100644 --- a/media/libnbaio/NBAIO.cpp +++ b/media/libnbaio/NBAIO.cpp @@ -27,6 +27,7 @@ size_t Format_frameSize(const NBAIO_Format& format) return format.mFrameSize; } +#if 0 int Format_frameBitShift(const NBAIO_Format& format) { // FIXME The sample format is hard-coded to AUDIO_FORMAT_PCM_16_BIT @@ -34,6 +35,7 @@ int Format_frameBitShift(const NBAIO_Format& format) return Format_channelCount(format); // FIXME must return -1 for non-power of 2 } +#endif const NBAIO_Format Format_Invalid = { 0, 0, AUDIO_FORMAT_INVALID, 0 }; diff --git a/media/libnbaio/SourceAudioBufferProvider.cpp b/media/libnbaio/SourceAudioBufferProvider.cpp index 791fe7c..e21ef48 100644 --- a/media/libnbaio/SourceAudioBufferProvider.cpp +++ b/media/libnbaio/SourceAudioBufferProvider.cpp @@ -37,7 +37,6 @@ SourceAudioBufferProvider::SourceAudioBufferProvider(const sp& sou numCounterOffers = 0; index = source->negotiate(counterOffers, 1, NULL, numCounterOffers); ALOG_ASSERT(index == 0); - mFrameBitShift = Format_frameBitShift(source->format()); mFrameSize = Format_frameSize(source->format()); } -- cgit v1.1