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

Commit 0ed70e50 authored by Pete Ricci's avatar Pete Ricci Committed by Automerger Merge Worker
Browse files

Merge "audioflinger: Add flag OFFLOAD to track flags" into main am: f701babe

parents 53e4f63b f701babe
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2690,14 +2690,17 @@ sp<IAfTrack> PlaybackThread::createTrack_l(
            }
        }

        // Set DIRECT flag if current thread is DirectOutputThread. This can
        // happen when the playback is rerouted to direct output thread by
        // Set DIRECT/OFFLOAD flag if current thread is DirectOutputThread/OffloadThread.
        // This can happen when the playback is rerouted to direct output/offload thread by
        // dynamic audio policy.
        // Do NOT report the flag changes back to client, since the client
        // doesn't explicitly request a direct flag.
        // doesn't explicitly request a direct/offload flag.
        audio_output_flags_t trackFlags = *flags;
        if (mType == DIRECT) {
            trackFlags = static_cast<audio_output_flags_t>(trackFlags | AUDIO_OUTPUT_FLAG_DIRECT);
        } else if (mType == OFFLOAD) {
            trackFlags = static_cast<audio_output_flags_t>(trackFlags |
                                   AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT);
        }
        *afTrackFlags = trackFlags;