Skip to content

Commit

Permalink
Fix for debug code crashing firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
cutlasses committed May 16, 2019
1 parent 31d8cdb commit f9ea553
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions AudioFreezeEffect.ino
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,6 @@ void AUDIO_FREEZE_EFFECT::write_to_buffer( const int16_t* source, int size )
{
write_sample( source[x], trunc_to_int(m_head) );

const int diff = m_head == 0 ? abs( read_sample( m_buffer_size_in_samples - 1 ) - read_sample( trunc_to_int(m_head) ) ) : abs( read_sample( trunc_to_int(m_head) - 1 ) - read_sample( trunc_to_int(m_head) ) );
if( trunc_to_int(m_head) > 0 && diff > 2000 )
{
printf( "WHOOPS" );
}

if( trunc_to_int(++m_head) == m_buffer_size_in_samples )
{
m_head = 0.0f;
Expand Down

0 comments on commit f9ea553

Please sign in to comment.