bug fix
This commit is contained in:
parent
d8eb5a9752
commit
7c4374e20d
2 changed files with 11 additions and 9 deletions
|
@ -98,18 +98,17 @@ void CLlconVST::processReplacing ( float** pvIn,
|
||||||
// copy input data
|
// copy input data
|
||||||
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
||||||
{
|
{
|
||||||
(*Client.GetSound()->GetBuffer())[j] = pfIn0[i];
|
Client.GetSound()->vecsTmpAudioSndCrdStereo[j] = pfIn0[i];
|
||||||
(*Client.GetSound()->GetBuffer())[j + 1] = pfIn1[i];
|
Client.GetSound()->vecsTmpAudioSndCrdStereo[j + 1] = pfIn1[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// call processing callback function
|
// call processing callback function
|
||||||
Client.GetSound()->VSTProcessCallback (
|
Client.GetSound()->VSTProcessCallback();
|
||||||
*Client.GetSound()->GetBuffer() );
|
|
||||||
|
|
||||||
// copy output data
|
// copy output data
|
||||||
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
||||||
{
|
{
|
||||||
pfOut0[i] = (*Client.GetSound()->GetBuffer())[j];
|
pfOut0[i] = Client.GetSound()->vecsTmpAudioSndCrdStereo[j];
|
||||||
pfOut1[i] = (*Client.GetSound()->GetBuffer())[j + 1];
|
pfOut1[i] = Client.GetSound()->vecsTmpAudioSndCrdStereo[j + 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,19 +41,22 @@ public:
|
||||||
|
|
||||||
// special VST functions
|
// special VST functions
|
||||||
void SetMonoBufferSize ( const int iNVBS ) { iVSTMonoBufferSize = iNVBS; }
|
void SetMonoBufferSize ( const int iNVBS ) { iVSTMonoBufferSize = iNVBS; }
|
||||||
CVector<int16_t>* GetBuffer() { return &vecsAudioSndCrdStereo; }
|
void VSTProcessCallback()
|
||||||
void VSTProcessCallback ( CVector<int16_t>& psData )
|
|
||||||
{
|
{
|
||||||
CSoundBase::ProcessCallback ( psData );
|
CSoundBase::ProcessCallback ( vecsTmpAudioSndCrdStereo );
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int Init ( const int )
|
virtual int Init ( const int )
|
||||||
{
|
{
|
||||||
// init base class
|
// init base class
|
||||||
CSoundBase::Init ( iVSTMonoBufferSize );
|
CSoundBase::Init ( iVSTMonoBufferSize );
|
||||||
|
vecsTmpAudioSndCrdStereo.Init ( 2 * iVSTMonoBufferSize /* stereo */);
|
||||||
return iVSTMonoBufferSize;
|
return iVSTMonoBufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this vector must be accessible from the outside (quick hack solution)
|
||||||
|
CVector<int16_t> vecsTmpAudioSndCrdStereo;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int iVSTMonoBufferSize;
|
int iVSTMonoBufferSize;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue