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

Commit fcce691b authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

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

* commit '945d3ba7':
  AudioSink: Fix for gapless offload playback
parents 9d65efac 945d3ba7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1730,7 +1730,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;
@@ -1742,7 +1742,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);