Commit 62c3c542 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing interface problems with SIMO VDL

parent d5cbfac6
......@@ -29,6 +29,7 @@
//! Vorwärtsdeklarationen
class ITASampleBuffer;
class ITASampleFrame;
class IITAVDLInterpolationRoutine;
//! Single-input multiple-output block-based variable delay line
......
......@@ -221,16 +221,19 @@ void CITASIMOVariableDelayLine::SetDelayTime( const int iCursorID, const float f
SetDelaySamples( iCursorID, fDelaySeconds * ( float ) m_dSampleRate );
}
void CITASIMOVariableDelayLine::ReadBlock( const int iID, ITASampleBuffer* psbOutput )
void CITASIMOVariableDelayLine::ReadBlock( const int iCursorID, ITASampleBuffer* psbOutput )
{
if( !CursorExists( iCursorID ) )
ITA_EXCEPT1( INVALID_PARAMETER, "Could not find requested read cursor" );
m_swProcess.start();
// Lokale Kopie des gewnschten Algorithmus (Atomare Membervariable)
int iAlgorithm = m_iSwitchingAlgorithm;
// Lokale Kopie der neuen Verzgerung
float fCurrentDelay = m_fCurrentDelay;
float fNewDelay = m_fNewDelay;
float fCurrentDelay = m_lUserCursors[ iCursorID ].fOldReadCursorSamples;
float fNewDelay = m_lUserCursors[ iCursorID ].fNewReadCursorSamples;
// --= Keine nderung der Verzgerung (fr rasant schnelle statische Szenen) =--
......@@ -383,19 +386,14 @@ void CITASIMOVariableDelayLine::ReadBlock( const int iID, ITASampleBuffer* psbOu
} // end case switch
// Neue Verzgerung speichern
m_fCurrentDelay = fNewDelay;
m_lUserCursors[ iCursorID ].fOldReadCursorSamples = fNewDelay;
// Schreibzeiger inkrementieren
// (Hinweis: Der Schreibzeiger ist immer Vielfaches der Blocklnge)
m_iWriteCursor = ( m_iWriteCursor + m_iBlockLength ) % m_iVDLBufferSize;
// Zeitnahme
double t = m_swProcess.stop();
if( t > m_iBlockLength / m_dSampleRate )
{
m_iNumberOfDropouts++;
}
double t = m_swProcess.stop();
return;
}
......
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