Skip to content

Commit 6e8681d

Browse files
ronso0daschuer
authored andcommitted
fade out: add comment
1 parent 7e56d0a commit 6e8681d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/engine/readaheadmanager.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ SINT ReadAheadManager::getNextSamples(double dRate, CSAMPLE* pOutput,
9898
// Previous read was a cache miss, but now we got something back.
9999
// Apply ramping gain, because the last buffer has unwanted silence
100100
// and new samples without fading are causing a pop.
101-
SampleUtil::applyRampingGain(pOutput, 0.0, 1.0, samples_from_reader);
101+
SampleUtil::applyRampingGain(pOutput,
102+
CSAMPLE_GAIN_ZERO,
103+
CSAMPLE_GAIN_ONE,
104+
samples_from_reader);
102105
// Reset the cache miss flag, because we are now back on track.
103106
m_cacheMissHappened = false;
104107
}
@@ -187,6 +190,7 @@ SINT ReadAheadManager::getNextSamples(double dRate, CSAMPLE* pOutput,
187190
crossFadeSamples);
188191
}
189192
} else {
193+
// No samples for crossfading, ramp to zero
190194
SampleUtil::applyRampingGain(pOutput,
191195
CSAMPLE_GAIN_ONE,
192196
CSAMPLE_GAIN_ZERO,

0 commit comments

Comments
 (0)