Skip to content

Commit

Permalink
Protect from soundtouch crashes due to pitch == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Apr 8, 2015
1 parent 7c3f291 commit 98bb453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/enginebufferscalest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void EngineBufferScaleST::clear() {
CSAMPLE* EngineBufferScaleST::getScaled(unsigned long buf_size) {
m_samplesRead = 0.0;

if (m_dRateOld == 0 || m_dTempoOld == 0) {
if (m_dRateOld == 0 || m_dTempoOld == 0 || m_dPitch == 0) {
SampleUtil::clear(m_buffer, buf_size);
m_samplesRead = buf_size;
return m_buffer;
Expand Down

0 comments on commit 98bb453

Please sign in to comment.