Loading include/media/nbaio/NBAIO.h +2 −3 Original line number Diff line number Diff line Loading @@ -67,9 +67,8 @@ extern const NBAIO_Format Format_Invalid; size_t Format_frameSize(const NBAIO_Format& format); // Convert a sample rate in Hz and channel count to an NBAIO_Format // FIXME Remove the default value of AUDIO_FORMAT_PCM_16_BIT, and rename NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount, audio_format_t format = AUDIO_FORMAT_PCM_16_BIT); // FIXME rename NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount, audio_format_t format); // Return the sample rate in Hz of an NBAIO_Format unsigned Format_sampleRate(const NBAIO_Format& format); Loading media/libnbaio/AudioStreamInSource.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ ssize_t AudioStreamInSource::negotiate(const NBAIO_Format offers[], size_t numOf uint32_t sampleRate = mStream->common.get_sample_rate(&mStream->common); audio_channel_mask_t channelMask = (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask), streamFormat); mFrameSize = Format_frameSize(mFormat); } return NBAIO_Source::negotiate(offers, numOffers, counterOffers, numCounterOffers); Loading media/libnbaio/AudioStreamOutSink.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ ssize_t AudioStreamOutSink::negotiate(const NBAIO_Format offers[], size_t numOff uint32_t sampleRate = mStream->common.get_sample_rate(&mStream->common); audio_channel_mask_t channelMask = (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask), streamFormat); mFrameSize = Format_frameSize(mFormat); } return NBAIO_Sink::negotiate(offers, numOffers, counterOffers, numCounterOffers); Loading services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2567,7 +2567,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // create an NBAIO sink for the HAL output stream, and negotiate mOutputSink = new AudioStreamOutSink(output->stream); size_t numCounterOffers = 0; const NBAIO_Format offers[1] = {Format_from_SR_C(mSampleRate, mChannelCount)}; const NBAIO_Format offers[1] = {Format_from_SR_C(mSampleRate, mChannelCount, mFormat)}; ssize_t index = mOutputSink->negotiate(offers, 1, NULL, numCounterOffers); ALOG_ASSERT(index == 0); Loading Loading
include/media/nbaio/NBAIO.h +2 −3 Original line number Diff line number Diff line Loading @@ -67,9 +67,8 @@ extern const NBAIO_Format Format_Invalid; size_t Format_frameSize(const NBAIO_Format& format); // Convert a sample rate in Hz and channel count to an NBAIO_Format // FIXME Remove the default value of AUDIO_FORMAT_PCM_16_BIT, and rename NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount, audio_format_t format = AUDIO_FORMAT_PCM_16_BIT); // FIXME rename NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount, audio_format_t format); // Return the sample rate in Hz of an NBAIO_Format unsigned Format_sampleRate(const NBAIO_Format& format); Loading
media/libnbaio/AudioStreamInSource.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ ssize_t AudioStreamInSource::negotiate(const NBAIO_Format offers[], size_t numOf uint32_t sampleRate = mStream->common.get_sample_rate(&mStream->common); audio_channel_mask_t channelMask = (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask), streamFormat); mFrameSize = Format_frameSize(mFormat); } return NBAIO_Source::negotiate(offers, numOffers, counterOffers, numCounterOffers); Loading
media/libnbaio/AudioStreamOutSink.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ ssize_t AudioStreamOutSink::negotiate(const NBAIO_Format offers[], size_t numOff uint32_t sampleRate = mStream->common.get_sample_rate(&mStream->common); audio_channel_mask_t channelMask = (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); mFormat = Format_from_SR_C(sampleRate, popcount(channelMask), streamFormat); mFrameSize = Format_frameSize(mFormat); } return NBAIO_Sink::negotiate(offers, numOffers, counterOffers, numCounterOffers); Loading
services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2567,7 +2567,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // create an NBAIO sink for the HAL output stream, and negotiate mOutputSink = new AudioStreamOutSink(output->stream); size_t numCounterOffers = 0; const NBAIO_Format offers[1] = {Format_from_SR_C(mSampleRate, mChannelCount)}; const NBAIO_Format offers[1] = {Format_from_SR_C(mSampleRate, mChannelCount, mFormat)}; ssize_t index = mOutputSink->negotiate(offers, 1, NULL, numCounterOffers); ALOG_ASSERT(index == 0); Loading