Skip to content

Commit

Permalink
Fix AudioFileProcessor reverse bug (#6958)
Browse files Browse the repository at this point in the history
  • Loading branch information
szeli1 authored Nov 25, 2023
1 parent c2811ae commit 67ce167
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions plugins/AudioFileProcessor/AudioFileProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,14 +1169,19 @@ void AudioFileProcessorWaveView::slideSampleByFrames( f_cnt_t _frames )
return;
}
const double v = static_cast<double>( _frames ) / m_sampleBuffer.frames();
if( m_startKnob ) {
m_startKnob->slideBy( v, false );
}
if( m_endKnob ) {
m_endKnob->slideBy( v, false );
// update knobs in the right order
// to avoid them clamping each other
if (v < 0)
{
m_startKnob->slideBy(v, false);
m_loopKnob->slideBy(v, false);
m_endKnob->slideBy(v, false);
}
if( m_loopKnob ) {
m_loopKnob->slideBy( v, false );
else
{
m_endKnob->slideBy(v, false);
m_loopKnob->slideBy(v, false);
m_startKnob->slideBy(v, false);
}
}

Expand Down

0 comments on commit 67ce167

Please sign in to comment.