Loading media/libmediaplayerservice/nuplayer/GenericSource.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ void NuPlayer::GenericSource::start() { * 1. kKeyPCMFormat is not set * 2. kKeyPCMFormat is not set to 24bit */ ALOGI("Retrieving 24 bit data from source"); CHECK_EQ(mAudioTrack.mSource->start(audioMeta.get()), (status_t)OK); } else { CHECK_EQ(mAudioTrack.mSource->start(), (status_t)OK); Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -628,12 +628,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } sp<MetaData> audioMeta = mSource->getFormatMeta(true /* audio */); if (!(ExtendedUtils::isRAWFormat(audioMeta) && ExtendedUtils::is24bitPCMOffloadEnabled() && ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { // Call mSource->start() after openAudioSink for 24 bit pcm playback mSource->start(); } uint32_t flags = 0; Loading Loading @@ -994,8 +989,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { if ((ExtendedUtils::isRAWFormat(audioMeta) && ExtendedUtils::is24bitPCMOffloadEnabled() && ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { ALOGV("update pcmformat in WAVExtractor to 16 bit"); ALOGI("update pcm format in WAVExtractor to 16 bit"); ExtendedUtils::setKeyPCMFormat(audioMeta, AUDIO_FORMAT_PCM_16_BIT ); mSource->stop(); mSource->start(); } Loading Loading @@ -1298,6 +1294,8 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) { ExtendedUtils::is24bitPCMOffloadEnabled() && (ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { ExtendedUtils::setKeyPCMFormat(audioMeta,AUDIO_FORMAT_PCM_8_24_BIT); ALOGI("update pcmformat in WAVExtractor to 24 bit"); mSource->stop(); mSource->start(); } *decoder = new DecoderPassThrough(notify); Loading @@ -1306,6 +1304,8 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) { ExtendedUtils::is24bitPCMOffloadEnabled() && (ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { ExtendedUtils::setKeyPCMFormat(audioMeta,AUDIO_FORMAT_PCM_16_BIT); ALOGI("update pcmformat in WAVExtractor to 16 bit"); mSource->stop(); mSource->start(); } *decoder = new Decoder(notify); Loading Loading
media/libmediaplayerservice/nuplayer/GenericSource.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ void NuPlayer::GenericSource::start() { * 1. kKeyPCMFormat is not set * 2. kKeyPCMFormat is not set to 24bit */ ALOGI("Retrieving 24 bit data from source"); CHECK_EQ(mAudioTrack.mSource->start(audioMeta.get()), (status_t)OK); } else { CHECK_EQ(mAudioTrack.mSource->start(), (status_t)OK); Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -628,12 +628,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } sp<MetaData> audioMeta = mSource->getFormatMeta(true /* audio */); if (!(ExtendedUtils::isRAWFormat(audioMeta) && ExtendedUtils::is24bitPCMOffloadEnabled() && ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { // Call mSource->start() after openAudioSink for 24 bit pcm playback mSource->start(); } uint32_t flags = 0; Loading Loading @@ -994,8 +989,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { if ((ExtendedUtils::isRAWFormat(audioMeta) && ExtendedUtils::is24bitPCMOffloadEnabled() && ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { ALOGV("update pcmformat in WAVExtractor to 16 bit"); ALOGI("update pcm format in WAVExtractor to 16 bit"); ExtendedUtils::setKeyPCMFormat(audioMeta, AUDIO_FORMAT_PCM_16_BIT ); mSource->stop(); mSource->start(); } Loading Loading @@ -1298,6 +1294,8 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) { ExtendedUtils::is24bitPCMOffloadEnabled() && (ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { ExtendedUtils::setKeyPCMFormat(audioMeta,AUDIO_FORMAT_PCM_8_24_BIT); ALOGI("update pcmformat in WAVExtractor to 24 bit"); mSource->stop(); mSource->start(); } *decoder = new DecoderPassThrough(notify); Loading @@ -1306,6 +1304,8 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) { ExtendedUtils::is24bitPCMOffloadEnabled() && (ExtendedUtils::getPcmSampleBits(audioMeta) == 24)) { ExtendedUtils::setKeyPCMFormat(audioMeta,AUDIO_FORMAT_PCM_16_BIT); ALOGI("update pcmformat in WAVExtractor to 16 bit"); mSource->stop(); mSource->start(); } *decoder = new Decoder(notify); Loading