Loading services/audioflinger/Threads.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -11613,6 +11613,7 @@ void BitPerfectThread::threadLoop_mix() { void BitPerfectThread::setTracksInternalMute( void BitPerfectThread::setTracksInternalMute( std::map<audio_port_handle_t, bool>* tracksInternalMute) { std::map<audio_port_handle_t, bool>* tracksInternalMute) { audio_utils::lock_guard _l(mutex()); for (auto& track : mTracks) { for (auto& track : mTracks) { if (auto it = tracksInternalMute->find(track->portId()); it != tracksInternalMute->end()) { if (auto it = tracksInternalMute->find(track->portId()); it != tracksInternalMute->end()) { track->setInternalMute(it->second); track->setInternalMute(it->second); Loading @@ -11629,6 +11630,11 @@ sp<IAfTrack> BitPerfectThread::getTrackToStreamBitPerfectly_l() { // Return the bit perfect track if all other tracks are muted // Return the bit perfect track if all other tracks are muted for (const auto& track : mActiveTracks) { for (const auto& track : mActiveTracks) { if (track->isBitPerfect()) { if (track->isBitPerfect()) { if (track->getInternalMute()) { // There can only be one bit-perfect client active. If it is mute internally, // there is no need to stream bit-perfectly. break; } bitPerfectTrack = track; bitPerfectTrack = track; } else if (track->getFinalVolume() != 0.f) { } else if (track->getFinalVolume() != 0.f) { allOtherTracksMuted = false; allOtherTracksMuted = false; Loading Loading
services/audioflinger/Threads.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -11613,6 +11613,7 @@ void BitPerfectThread::threadLoop_mix() { void BitPerfectThread::setTracksInternalMute( void BitPerfectThread::setTracksInternalMute( std::map<audio_port_handle_t, bool>* tracksInternalMute) { std::map<audio_port_handle_t, bool>* tracksInternalMute) { audio_utils::lock_guard _l(mutex()); for (auto& track : mTracks) { for (auto& track : mTracks) { if (auto it = tracksInternalMute->find(track->portId()); it != tracksInternalMute->end()) { if (auto it = tracksInternalMute->find(track->portId()); it != tracksInternalMute->end()) { track->setInternalMute(it->second); track->setInternalMute(it->second); Loading @@ -11629,6 +11630,11 @@ sp<IAfTrack> BitPerfectThread::getTrackToStreamBitPerfectly_l() { // Return the bit perfect track if all other tracks are muted // Return the bit perfect track if all other tracks are muted for (const auto& track : mActiveTracks) { for (const auto& track : mActiveTracks) { if (track->isBitPerfect()) { if (track->isBitPerfect()) { if (track->getInternalMute()) { // There can only be one bit-perfect client active. If it is mute internally, // there is no need to stream bit-perfectly. break; } bitPerfectTrack = track; bitPerfectTrack = track; } else if (track->getFinalVolume() != 0.f) { } else if (track->getFinalVolume() != 0.f) { allOtherTracksMuted = false; allOtherTracksMuted = false; Loading