Skip to content

Commit

Permalink
Allways remove infs/nans
Browse files Browse the repository at this point in the history
When exporting a project lmms performs extra tests for bad data.
The tests are for infs and nans. Switching these tests on for all
occasions as the extra performance hit would be in the order of
only ~3% and the problems, when it hits the end user, are hard to
debug and/or work around.
  • Loading branch information
zonkmachine committed Jul 18, 2017
1 parent ebc9137 commit 2cd64c1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/core/EffectChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,16 @@ bool EffectChain::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames, b
{
return false;
}
const bool exporting = Engine::getSong()->isExporting();
if( exporting ) // strip infs/nans if exporting
{
MixHelpers::sanitize( _buf, _frames );
}

MixHelpers::sanitize( _buf, _frames );

bool moreEffects = false;
for( EffectList::Iterator it = m_effects.begin(); it != m_effects.end(); ++it )
{
if( hasInputNoise || ( *it )->isRunning() )
{
moreEffects |= ( *it )->processAudioBuffer( _buf, _frames );
if( exporting ) // strip infs/nans if exporting
{
MixHelpers::sanitize( _buf, _frames );
}
MixHelpers::sanitize( _buf, _frames );
}
}

Expand Down

0 comments on commit 2cd64c1

Please sign in to comment.