Loading include/media/nbaio/NBAIO.h +3 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,8 @@ public: protected: NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format), mBitShift(Format_frameBitShift(format)) { } mBitShift(Format_frameBitShift(format)), mFrameSize(Format_frameSize(format)) { } virtual ~NBAIO_Port() { } // Implementations are free to ignore these if they don't need them Loading @@ -134,6 +135,7 @@ protected: bool mNegotiated; // mNegotiated implies (mFormat != Format_Invalid) NBAIO_Format mFormat; // (mFormat != Format_Invalid) does not imply mNegotiated size_t mBitShift; // assign in parallel with any assignment to mFormat size_t mFrameSize; // assign in parallel with any assignment to mFormat }; // Abstract class (interface) representing a non-blocking data sink, for use by a data provider. Loading include/media/nbaio/SourceAudioBufferProvider.h +1 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ public: private: const sp<NBAIO_Source> mSource; // the wrapped source /*const*/ size_t mFrameBitShift; // log2(frame size in bytes) /*const*/ size_t mFrameSize; // frame size in bytes void* mAllocated; // pointer to base of allocated memory size_t mSize; // size of mAllocated in frames size_t mOffset; // frame offset within mAllocated of valid data Loading media/libnbaio/AudioStreamInSource.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading media/libnbaio/AudioStreamOutSink.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading media/libnbaio/SourceAudioBufferProvider.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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() Loading Loading
include/media/nbaio/NBAIO.h +3 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,8 @@ public: protected: NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format), mBitShift(Format_frameBitShift(format)) { } mBitShift(Format_frameBitShift(format)), mFrameSize(Format_frameSize(format)) { } virtual ~NBAIO_Port() { } // Implementations are free to ignore these if they don't need them Loading @@ -134,6 +135,7 @@ protected: bool mNegotiated; // mNegotiated implies (mFormat != Format_Invalid) NBAIO_Format mFormat; // (mFormat != Format_Invalid) does not imply mNegotiated size_t mBitShift; // assign in parallel with any assignment to mFormat size_t mFrameSize; // assign in parallel with any assignment to mFormat }; // Abstract class (interface) representing a non-blocking data sink, for use by a data provider. Loading
include/media/nbaio/SourceAudioBufferProvider.h +1 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ public: private: const sp<NBAIO_Source> mSource; // the wrapped source /*const*/ size_t mFrameBitShift; // log2(frame size in bytes) /*const*/ size_t mFrameSize; // frame size in bytes void* mAllocated; // pointer to base of allocated memory size_t mSize; // size of mAllocated in frames size_t mOffset; // frame offset within mAllocated of valid data Loading
media/libnbaio/AudioStreamInSource.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading
media/libnbaio/AudioStreamOutSink.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading
media/libnbaio/SourceAudioBufferProvider.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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() Loading