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

Commit ded9d933 authored by Mingming Yin's avatar Mingming Yin Committed by Scott Mertz
Browse files

audiopolicy: use deep_buffer as default output for music stream

- update output flag to AUDIO_OUTPUT_FLAG_DEEP_BUFFER for music
  stream if output flag is not set.

CYNGNOS-952

Change-Id: I2afb205c15f73545168a8d1f68b29df01934da88
parent 702f70a0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1633,6 +1633,9 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
    // only allow deep buffering for music stream type
    if (stream != AUDIO_STREAM_MUSIC) {
        flags = (audio_output_flags_t)(flags &~AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
    } else if (flags == AUDIO_OUTPUT_FLAG_NONE) {
        //use DEEP_BUFFER as default output for music stream type
        flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
    }

    if ((format == AUDIO_FORMAT_PCM_16_BIT) &&(popcount(channelMask) > 2)) {