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

Commit 23b206db 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

Change-Id: I9a79249920720d0979ee514645ae83ffe554ba8d
parents 14b7161b b0cc0bc2
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