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

Commit bd1c3e36 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "audiopolicy: use deep buffer output by default for music streams" into mnc-dev

parents ad9ef61e 439e4ed4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -789,6 +789,11 @@ 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 (/* stream == AUDIO_STREAM_MUSIC && */
            flags == AUDIO_OUTPUT_FLAG_NONE &&
            property_get_bool("audio.deep_buffer.media", false /* default_value */)) {
        // use DEEP_BUFFER as default output for music stream type
        flags = (audio_output_flags_t)AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
    }
    if (stream == AUDIO_STREAM_TTS) {
        flags = AUDIO_OUTPUT_FLAG_TTS;