added some VST preparations
This commit is contained in:
parent
f39834457c
commit
7540ca9d63
3 changed files with 45 additions and 8 deletions
|
@ -51,7 +51,7 @@ CLlconVST::CLlconVST ( audioMasterCallback AudioMaster ) :
|
|||
// we want a single shot timer to shut down the connection if no
|
||||
// processing is done anymore (VST host has stopped the stream)
|
||||
TimerOnOff.setSingleShot ( true );
|
||||
TimerOnOff.setInterval ( VST_STOP_TIMER_INTERVAL );
|
||||
TimerOnOff.setInterval ( VST_STOP_TIMER_INTERVAL );
|
||||
|
||||
// connect timer event
|
||||
connect ( &TimerOnOff, SIGNAL ( timeout() ),
|
||||
|
@ -76,21 +76,46 @@ void CLlconVST::processReplacing ( float** pvIn,
|
|||
float** pvOut,
|
||||
VstInt32 iNumSamples )
|
||||
{
|
||||
int i, j;
|
||||
|
||||
// reset stop timer
|
||||
TimerOnOff.start();
|
||||
|
||||
// check if client is running, if not, start it
|
||||
if ( !Client.IsRunning() )
|
||||
{
|
||||
|
||||
// TODO set iNumSamples in Sound class somehow
|
||||
|
||||
Client.Start();
|
||||
}
|
||||
|
||||
// get pointers to actual buffers
|
||||
float* pfIn0 = pvIn[0];
|
||||
float* pfIn1 = pvIn[1];
|
||||
float* pfOut0 = pvOut[0];
|
||||
float* pfOut1 = pvOut[1];
|
||||
|
||||
|
||||
// TODO here we just copy the data -> add llcon processing here!
|
||||
|
||||
for ( int i = 0; i < iNumSamples; i++ )
|
||||
// copy input data
|
||||
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
||||
{
|
||||
pfOut0[i] = pfIn0[i];
|
||||
pfOut1[i] = pfIn1[i];
|
||||
/*
|
||||
pSound->vecsTmpAudioSndCrdStereo[j] = pfIn0[i];
|
||||
pSound->vecsTmpAudioSndCrdStereo[j + 1] = pfIn1[i];
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
// call processing callback function
|
||||
pSound->ProcessCallback ( pSound->vecsTmpAudioSndCrdStereo );
|
||||
*/
|
||||
|
||||
// copy output data
|
||||
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
||||
{
|
||||
/*
|
||||
pfOut0[i] = pSound->vecsTmpAudioSndCrdStereo[j];
|
||||
pfOut1[i] = pSound->vecsTmpAudioSndCrdStereo[j + 1];
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,18 @@ public:
|
|||
// TODO
|
||||
}
|
||||
virtual ~CSound() {}
|
||||
|
||||
virtual int Init ( const int iNewPrefMonoBufferSize )
|
||||
{
|
||||
// TODO we have to query the current VST frame size somehow
|
||||
|
||||
const int iVSTMonoBufferSize = iNewPrefMonoBufferSize;
|
||||
|
||||
// init base class
|
||||
CSoundBase::Init ( iVSTMonoBufferSize );
|
||||
|
||||
return iVSTMonoBufferSize;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !defined ( _VSTSOUND_H__9518A346345768_11D3_8C0D_EEBF182CF549__INCLUDED_ )
|
||||
|
|
|
@ -460,7 +460,7 @@ int CSound::Init ( const int iNewPrefMonoBufferSize )
|
|||
iASIOBufferSizeMono =
|
||||
GetActualBufferSize ( iNewPrefMonoBufferSize );
|
||||
|
||||
// init base clasee
|
||||
// init base class
|
||||
CSoundBase::Init ( iASIOBufferSizeMono );
|
||||
|
||||
// set internal buffer size value and calculate stereo buffer size
|
||||
|
|
Loading…
Add table
Reference in a new issue