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

Commit 945d3ba7 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "AudioSink: Fix for gapless offload playback" into mnc-dr-dev

parents 53aefba7 2e17eef8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1734,7 +1734,7 @@ status_t MediaPlayerService::AudioOutput::open(
    t->setVolume(mLeftVolume, mRightVolume);

    mSampleRateHz = sampleRate;
    mFlags = t->getFlags(); // we suggest the flags above, but new AudioTrack() may not grant it.
    mFlags = flags;
    mMsecsPerFrame = 1E3f / (mPlaybackRate.mSpeed * sampleRate);
    mFrameSize = t->frameSize();
    uint32_t pos;
@@ -1746,7 +1746,7 @@ status_t MediaPlayerService::AudioOutput::open(
    status_t res = NO_ERROR;
    // Note some output devices may give us a direct track even though we don't specify it.
    // Example: Line application b/17459982.
    if ((mFlags & (AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT)) == 0) {
    if ((t->getFlags() & (AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT)) == 0) {
        res = t->setPlaybackRate(mPlaybackRate);
        if (res == NO_ERROR) {
            t->setAuxEffectSendLevel(mSendLevel);