diff options
author | Glenn Kasten <gkasten@google.com> | 2014-03-06 08:00:31 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-03-06 08:40:37 -0800 |
commit | ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb (patch) | |
tree | 7e569cdaab0966b7e3c1c02118361f223fdaaf98 /media/libnbaio | |
parent | 7a0662afeba50b78f43ce24539230cace30c3cfd (diff) | |
download | frameworks_av-ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb.zip frameworks_av-ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb.tar.gz frameworks_av-ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb.tar.bz2 |
Add mFrameSize but do not remove mFrameBitShift yet
Change-Id: Icb1edefeb6a0e659503f6b7a92c9d15784df9865
Diffstat (limited to 'media/libnbaio')
-rw-r--r-- | media/libnbaio/AudioStreamInSource.cpp | 1 | ||||
-rw-r--r-- | media/libnbaio/AudioStreamOutSink.cpp | 1 | ||||
-rw-r--r-- | media/libnbaio/SourceAudioBufferProvider.cpp | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/media/libnbaio/AudioStreamInSource.cpp b/media/libnbaio/AudioStreamInSource.cpp index ae8fac8..ca7b8e0 100644 --- a/media/libnbaio/AudioStreamInSource.cpp +++ b/media/libnbaio/AudioStreamInSource.cpp @@ -49,6 +49,7 @@ ssize_t AudioStreamInSource::negotiate(const NBAIO_Format offers[], size_t numOf (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); } } return NBAIO_Source::negotiate(offers, numOffers, counterOffers, numCounterOffers); diff --git a/media/libnbaio/AudioStreamOutSink.cpp b/media/libnbaio/AudioStreamOutSink.cpp index aa9810e..5158f01 100644 --- a/media/libnbaio/AudioStreamOutSink.cpp +++ b/media/libnbaio/AudioStreamOutSink.cpp @@ -46,6 +46,7 @@ ssize_t AudioStreamOutSink::negotiate(const NBAIO_Format offers[], size_t numOff (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); } } return NBAIO_Sink::negotiate(offers, numOffers, counterOffers, numCounterOffers); diff --git a/media/libnbaio/SourceAudioBufferProvider.cpp b/media/libnbaio/SourceAudioBufferProvider.cpp index 062fa0f..0e77795 100644 --- a/media/libnbaio/SourceAudioBufferProvider.cpp +++ b/media/libnbaio/SourceAudioBufferProvider.cpp @@ -24,7 +24,7 @@ namespace android { SourceAudioBufferProvider::SourceAudioBufferProvider(const sp<NBAIO_Source>& source) : mSource(source), - // mFrameBitShiftFormat below + // mFrameSize below mAllocated(NULL), mSize(0), mOffset(0), mRemaining(0), mGetCount(0), mFramesReleased(0) { ALOG_ASSERT(source != 0); @@ -38,6 +38,7 @@ SourceAudioBufferProvider::SourceAudioBufferProvider(const sp<NBAIO_Source>& sou index = source->negotiate(counterOffers, 1, NULL, numCounterOffers); ALOG_ASSERT(index == 0); mFrameBitShift = Format_frameBitShift(source->format()); + mFrameSize = Format_frameSize(source->format()); } SourceAudioBufferProvider::~SourceAudioBufferProvider() |