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

Commit b0cc0bc2 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

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

parents 12b97c8d 85395896
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -302,6 +302,12 @@ bool AudioMixer::setChannelMasks(int name,
void AudioMixer::track_t::unprepareForDownmix() {
void AudioMixer::track_t::unprepareForDownmix() {
    ALOGV("AudioMixer::unprepareForDownmix(%p)", this);
    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;
    mDownmixRequiresFormat = AUDIO_FORMAT_INVALID;
    if (downmixerBufferProvider != NULL) {
    if (downmixerBufferProvider != NULL) {
        // this track had previously been configured with a downmixer, delete it
        // this track had previously been configured with a downmixer, delete it