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

Commit 20cb827a authored by Marco Nelissen's avatar Marco Nelissen
Browse files

resolve merge conflicts of 89c03a36 to nyc-dev-plus-aosp

Change-Id: Iadc9712436524303be184c60a622ef79f0efb3e7
parents 0f75d202 89c03a36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ private:
    sp<IdleToLoadedState> mIdleToLoadedState;
    sp<FlushingState> mFlushingState;
    sp<SkipCutBuffer> mSkipCutBuffer;
    int32_t mSampleRate;

    AString mComponentName;
    uint32_t mFlags;
+11 −3
Original line number Diff line number Diff line
@@ -494,7 +494,8 @@ void ACodec::BufferInfo::checkReadFence(const char *dbg) {
////////////////////////////////////////////////////////////////////////////////

ACodec::ACodec()
    : mQuirks(0),
    : mSampleRate(0),
      mQuirks(0),
      mNode(0),
      mUsingNativeWindow(false),
      mNativeWindowUsageBits(0),
@@ -2650,6 +2651,7 @@ status_t ACodec::setupAACCodec(
    } else {
        ALOGW("did not set AudioAndroidAacPresentation due to error %d when setting AudioAac", res);
    }
    mSampleRate = sampleRate;
    return res;
}

@@ -5178,8 +5180,14 @@ void ACodec::sendFormatChange() {
    CHECK(mOutputFormat->findString("mime", &mime));

    if (mime == MEDIA_MIMETYPE_AUDIO_RAW && (mEncoderDelay || mEncoderPadding)) {
        int32_t channelCount;
        CHECK(mOutputFormat->findInt32("channel-count", &channelCount));
        int32_t channelCount, sampleRate;
        CHECK(notify->findInt32("channel-count", &channelCount));
        CHECK(mOutputFormat->findInt32("sample-rate", &sampleRate));
        if (mSampleRate != 0 && sampleRate != 0) {
            mEncoderDelay = mEncoderDelay * sampleRate / mSampleRate;
            mEncoderPadding = mEncoderPadding * sampleRate / mSampleRate;
            mSampleRate = sampleRate;
        }
        if (mSkipCutBuffer != NULL) {
            size_t prevbufsize = mSkipCutBuffer->size();
            if (prevbufsize != 0) {