Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b53717c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Invalidate compressed tracks when secondary outputs are changed." am:...

Merge "Invalidate compressed tracks when secondary outputs are changed." am: 6a3eb80e am: bd82c306

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1995338

Change-Id: Ia5043524a2b13d470c716a210b4614295cc9189f
parents e5214c68 bd82c306
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -5986,6 +5986,11 @@ void AudioPolicyManager::checkSecondaryOutputs() {
                    client->getSecondaryOutputs().begin(),
                    client->getSecondaryOutputs().end(),
                    secondaryDescs.begin(), secondaryDescs.end())) {
                if (!audio_is_linear_pcm(client->config().format)) {
                    // If the format is not PCM, the tracks should be invalidated to get correct
                    // behavior when the secondary output is changed.
                    streamsToInvalidate.insert(client->stream());
                } else {
                    std::vector<wp<SwAudioOutputDescriptor>> weakSecondaryDescs;
                    std::vector<audio_io_handle_t> secondaryOutputIds;
                    for (const auto &secondaryDesc: secondaryDescs) {
@@ -5997,6 +6002,7 @@ void AudioPolicyManager::checkSecondaryOutputs() {
                }
            }
        }
    }
    if (!trackSecondaryOutputs.empty()) {
        mpClientInterface->updateSecondaryOutputs(trackSecondaryOutputs);
    }