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

Commit 00f5e1ab authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

Merge "AudioMixer: fix assertion for multichannel playback" into oc-dev am: b0cc0bc2

am: 23b206db

Change-Id: Ic4daba25135f4588fe25455609a524a21452a316
parents fdb3f0a8 23b206db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -302,6 +302,12 @@ bool AudioMixer::setChannelMasks(int name,
void AudioMixer::track_t::unprepareForDownmix() {
    ALOGV("AudioMixer::unprepareForDownmix(%p)", this);

    if (mPostDownmixReformatBufferProvider != nullptr) {
        // release any buffers held by the mPostDownmixReformatBufferProvider
        // before deallocating the downmixerBufferProvider.
        mPostDownmixReformatBufferProvider->reset();
    }

    mDownmixRequiresFormat = AUDIO_FORMAT_INVALID;
    if (downmixerBufferProvider != NULL) {
        // this track had previously been configured with a downmixer, delete it