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

Commit a63ba42a authored by Antti S. Lankila's avatar Antti S. Lankila
Browse files

Initialize dither state during object construction

parent 580e5ad4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -56,6 +56,13 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate, AudioDSP& dsp)
    mState.outputTemp   = 0;
    mState.resampleTemp = 0;
    mState.hook         = process__nop;
    mState.dither.errorL = 0;
    mState.dither.errorR = 0;
    for (int i = 0; i < 4; i ++) {
        mState.dither.lipshitzL[i] = 0;
        mState.dither.lipshitzR[i] = 0;
    }
    mState.dither.oldDither = 0;
    track_t* t = mState.tracks;
    for (int i=0 ; i<32 ; i++) {
        t->needs = 0;