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

Commit 1c09d363 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "AudioTrack: Reject offloading for non-music streams"

parents 89a4009d 334e6a4c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -357,6 +357,10 @@ status_t AudioTrack::set(
    // only allow deep buffering for music stream type
    if (mStreamType != AUDIO_STREAM_MUSIC) {
        flags = (audio_output_flags_t)(flags &~AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
        if (flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
            ALOGE("Offloading only allowed with music stream");
            return BAD_VALUE; // To trigger fallback or let the client handle
        }
    }

    if ((mStreamType == AUDIO_STREAM_VOICE_CALL) &&