Commit 65646533 authored by henryjandrew's avatar henryjandrew
Browse files

updated VDLBase so that even when the delay is the same as the last block, the...

updated VDLBase so that even when the delay is the same as the last block, the overlap samples are considered
parent 9e84786b
......@@ -281,22 +281,13 @@ void CITASIMOVariableDelayLineBase::Read( const int iCursorID, const int iNumSam
int iNewDelayLocalCopy = oReadCursor.iNewReadCursorSamples;
// Use a fast-forward copy in case of no new delay (static situation)
if( iNewDelayLocalCopy == iCurrentDelayLocalCopy )
{
// No change of delay, simply copy samples from read cursor
int iReadCursor = ( m_iWriteCursor - iCurrentDelayLocalCopy + m_iVDLBufferSize ) % m_iVDLBufferSize;
m_psbVDLBuffer->cyclic_read( pfOutput, GetEffectiveReadLength( iCursorID, iNumSamples ), iReadCursor );
int iReadCursor = ( m_iWriteCursor - iCurrentDelayLocalCopy + m_iVDLBufferSize ) % m_iVDLBufferSize;
return;
}
else
int iEffectiveNumSamples = GetEffectiveReadLength( iCursorID, iNumSamples );
m_psbVDLBuffer->cyclic_read( pfOutput, iEffectiveNumSamples, iReadCursor - oReadCursor.iOverlapSamplesLeft );
if( iNewDelayLocalCopy != iCurrentDelayLocalCopy )
{
int iReadCursor = ( m_iWriteCursor - iCurrentDelayLocalCopy + m_iVDLBufferSize ) % m_iVDLBufferSize;
int iEffectiveNumSamples = GetEffectiveReadLength( iCursorID, iNumSamples );
//assert( GetHeadroomSamples( iCursorID ) > iEffectiveNumSamples );
m_psbVDLBuffer->cyclic_read( pfOutput, iEffectiveNumSamples, iReadCursor - oReadCursor.iOverlapSamplesLeft );
m_lUserCursors[ iCursorID ].iOldReadCursorSamples = iNewDelayLocalCopy;
}
// Swap new delay
m_lUserCursors[ iCursorID ].iOldReadCursorSamples = iNewDelayLocalCopy;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment