Loading media/jni/soundpool/Stream.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -282,8 +282,6 @@ void Stream::play_l(const std::shared_ptr<Sound>& sound, int32_t nextStreamID, priority, loop, rate, playerIId); // initialize track const audio_stream_type_t streamType = AudioSystem::attributesToStreamType(*mStreamManager->getAttributes()); const int32_t channelCount = sound->getChannelCount(); const auto sampleRate = (uint32_t)lround(double(sound->getSampleRate()) * rate); size_t frameCount = 0; Loading Loading @@ -328,8 +326,8 @@ void Stream::play_l(const std::shared_ptr<Sound>& sound, int32_t nextStreamID, attributionSource.token = sp<BBinder>::make(); mCallback = sp<StreamCallback>::make(this, toggle), // TODO b/182469354 make consistent with AudioRecord, add util for native source mAudioTrack = new AudioTrack(streamType, sampleRate, sound->getFormat(), channelMask, sound->getIMemory(), AUDIO_OUTPUT_FLAG_FAST, mAudioTrack = new AudioTrack(AUDIO_STREAM_DEFAULT, sampleRate, sound->getFormat(), channelMask, sound->getIMemory(), AUDIO_OUTPUT_FLAG_NONE, mCallback, 0 /*default notification frames*/, AUDIO_SESSION_ALLOCATE, AudioTrack::TRANSFER_DEFAULT, Loading media/jni/soundpool/StreamManager.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,10 @@ StreamManager::StreamManager( int32_t streams, size_t threads, const audio_attributes_t& attributes, std::string opPackageName) : StreamMap(streams) , mAttributes(attributes) , mAttributes([attributes](){ audio_attributes_t attr = attributes; attr.flags = static_cast<audio_flags_mask_t>(attr.flags | AUDIO_FLAG_LOW_LATENCY); return attr; }()) , mOpPackageName(std::move(opPackageName)) , mLockStreamManagerStop(streams == 1 || kForceLockStreamManagerStop) { Loading Loading
media/jni/soundpool/Stream.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -282,8 +282,6 @@ void Stream::play_l(const std::shared_ptr<Sound>& sound, int32_t nextStreamID, priority, loop, rate, playerIId); // initialize track const audio_stream_type_t streamType = AudioSystem::attributesToStreamType(*mStreamManager->getAttributes()); const int32_t channelCount = sound->getChannelCount(); const auto sampleRate = (uint32_t)lround(double(sound->getSampleRate()) * rate); size_t frameCount = 0; Loading Loading @@ -328,8 +326,8 @@ void Stream::play_l(const std::shared_ptr<Sound>& sound, int32_t nextStreamID, attributionSource.token = sp<BBinder>::make(); mCallback = sp<StreamCallback>::make(this, toggle), // TODO b/182469354 make consistent with AudioRecord, add util for native source mAudioTrack = new AudioTrack(streamType, sampleRate, sound->getFormat(), channelMask, sound->getIMemory(), AUDIO_OUTPUT_FLAG_FAST, mAudioTrack = new AudioTrack(AUDIO_STREAM_DEFAULT, sampleRate, sound->getFormat(), channelMask, sound->getIMemory(), AUDIO_OUTPUT_FLAG_NONE, mCallback, 0 /*default notification frames*/, AUDIO_SESSION_ALLOCATE, AudioTrack::TRANSFER_DEFAULT, Loading
media/jni/soundpool/StreamManager.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,10 @@ StreamManager::StreamManager( int32_t streams, size_t threads, const audio_attributes_t& attributes, std::string opPackageName) : StreamMap(streams) , mAttributes(attributes) , mAttributes([attributes](){ audio_attributes_t attr = attributes; attr.flags = static_cast<audio_flags_mask_t>(attr.flags | AUDIO_FLAG_LOW_LATENCY); return attr; }()) , mOpPackageName(std::move(opPackageName)) , mLockStreamManagerStop(streams == 1 || kForceLockStreamManagerStop) { Loading