AFP: add a separate loopback point, and knob to control it.

This commit is contained in:
Vesa
2014-03-28 02:24:52 +02:00
parent 78337e5ac6
commit 5c142cb2a4
4 changed files with 175 additions and 91 deletions

View File

@@ -628,6 +628,7 @@ bool SampleBuffer::play( sampleFrame * _ab, handleState * _state,
const f_cnt_t total_frames_for_current_pitch = static_cast<f_cnt_t>( (
m_endFrame - m_startFrame ) /
freq_factor );
qDebug( "total pitched frames %d", total_frames_for_current_pitch );
if( total_frames_for_current_pitch == 0 )
{
return false;
@@ -663,6 +664,7 @@ bool SampleBuffer::play( sampleFrame * _ab, handleState * _state,
return false;
}
}
qDebug( "frames for loop %d", frames_for_loop );
sampleFrame * tmp = NULL;
@@ -1243,7 +1245,7 @@ void SampleBuffer::loadFromBase64( const QString & _data )
void SampleBuffer::setStartFrame( const f_cnt_t _s )
{
m_varLock.lock();
m_loopStartFrame = m_startFrame = _s;
m_startFrame = _s;
m_varLock.unlock();
}
@@ -1253,7 +1255,7 @@ void SampleBuffer::setStartFrame( const f_cnt_t _s )
void SampleBuffer::setEndFrame( const f_cnt_t _e )
{
m_varLock.lock();
m_loopEndFrame = m_endFrame = _e;
m_endFrame = _e;
m_varLock.unlock();
}