Make AFP include the last sample frame (#6399)

This commit is contained in:
Hussam al-Homsi
2022-07-04 22:19:56 -04:00
committed by GitHub
parent 6c3e148fbb
commit a6e6afb0ee

View File

@@ -426,9 +426,9 @@ void AudioFileProcessor::loopPointChanged()
void AudioFileProcessor::pointChanged()
{
const f_cnt_t f_start = static_cast<f_cnt_t>( m_startPointModel.value() * ( m_sampleBuffer.frames()-1 ) );
const f_cnt_t f_end = static_cast<f_cnt_t>( m_endPointModel.value() * ( m_sampleBuffer.frames()-1 ) );
const f_cnt_t f_loop = static_cast<f_cnt_t>( m_loopPointModel.value() * ( m_sampleBuffer.frames()-1 ) );
const f_cnt_t f_start = static_cast<f_cnt_t>( m_startPointModel.value() * m_sampleBuffer.frames() );
const f_cnt_t f_end = static_cast<f_cnt_t>( m_endPointModel.value() * m_sampleBuffer.frames() );
const f_cnt_t f_loop = static_cast<f_cnt_t>( m_loopPointModel.value() * m_sampleBuffer.frames() );
m_nextPlayStartPoint = f_start;
m_nextPlayBackwards = false;