Skip to content

Commit

Permalink
Fix effects being broken further into songs
Browse files Browse the repository at this point in the history
  • Loading branch information
Drewol committed Dec 15, 2020
1 parent 4cf1fbf commit ff87ac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Audio/src/AudioStreamPcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ void AudioStreamPcm::PreRenderDSPs_Internal(Vector<DSP *> &DSPs)
auto originalPlayPos = m_playPos;
for (auto &&dsp : DSPs)
{
m_playPos = (dsp->startTime * m_sampleRate) / 1000;
m_playPos = ((uint64)dsp->startTime * (uint64)m_sampleRate) / 1000;
m_samplePos = m_playPos;
int64 endSamplePos = (dsp->endTime * m_sampleRate) / 1000;
int64 endSamplePos = ((uint64)dsp->endTime * (uint64)m_sampleRate) / 1000;
endSamplePos = Math::Min(endSamplePos, (int64)m_samplesTotal);
if (m_playPos >= endSamplePos)
{
Expand Down

0 comments on commit ff87ac4

Please sign in to comment.