Loading services/audioflinger/Threads.cpp +12 −0 Original line number Original line Diff line number Diff line Loading @@ -4807,6 +4807,18 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac track->reset(); track->reset(); } } // Track destruction may occur outside of threadLoop once it is removed from active tracks. // Ensure the AudioMixer doesn't have a raw "buffer provider" pointer to the track if // it ceases to be active, to allow safe removal from the AudioMixer at the start // of prepareTracks_l(); this releases any outstanding buffer back to the track. // See also the implementation of destroyTrack_l(). for (const auto &track : *tracksToRemove) { const int name = track->name(); if (mAudioMixer->exists(name)) { // Normal tracks here, fast tracks in FastMixer. mAudioMixer->setBufferProvider(name, nullptr /* bufferProvider */); } } // remove all the tracks that need to be... // remove all the tracks that need to be... removeTracks_l(*tracksToRemove); removeTracks_l(*tracksToRemove); Loading Loading
services/audioflinger/Threads.cpp +12 −0 Original line number Original line Diff line number Diff line Loading @@ -4807,6 +4807,18 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac track->reset(); track->reset(); } } // Track destruction may occur outside of threadLoop once it is removed from active tracks. // Ensure the AudioMixer doesn't have a raw "buffer provider" pointer to the track if // it ceases to be active, to allow safe removal from the AudioMixer at the start // of prepareTracks_l(); this releases any outstanding buffer back to the track. // See also the implementation of destroyTrack_l(). for (const auto &track : *tracksToRemove) { const int name = track->name(); if (mAudioMixer->exists(name)) { // Normal tracks here, fast tracks in FastMixer. mAudioMixer->setBufferProvider(name, nullptr /* bufferProvider */); } } // remove all the tracks that need to be... // remove all the tracks that need to be... removeTracks_l(*tracksToRemove); removeTracks_l(*tracksToRemove); Loading