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
|
||||
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
||||
{
|
||||
(*Client.GetSound()->GetBuffer())[j] = pfIn0[i];
|
||||
(*Client.GetSound()->GetBuffer())[j + 1] = pfIn1[i];
|
||||
Client.GetSound()->vecsTmpAudioSndCrdStereo[j] = pfIn0[i];
|
||||
Client.GetSound()->vecsTmpAudioSndCrdStereo[j + 1] = pfIn1[i];
|
||||
}
|
||||
|
||||
// call processing callback function
|
||||
Client.GetSound()->VSTProcessCallback (
|
||||
*Client.GetSound()->GetBuffer() );
|
||||
Client.GetSound()->VSTProcessCallback();
|
||||
|
||||
// copy output data
|
||||
for ( i = 0, j = 0; i < iNumSamples; i++, j += 2 )
|
||||
{
|
||||
pfOut0[i] = (*Client.GetSound()->GetBuffer())[j];
|
||||
pfOut1[i] = (*Client.GetSound()->GetBuffer())[j + 1];
|
||||
pfOut0[i] = Client.GetSound()->vecsTmpAudioSndCrdStereo[j];
|
||||
pfOut1[i] = Client.GetSound()->vecsTmpAudioSndCrdStereo[j + 1];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,19 +41,22 @@ public:
|
|||
|
||||
// special VST functions
|
||||
void SetMonoBufferSize ( const int iNVBS ) { iVSTMonoBufferSize = iNVBS; }
|
||||
CVector<int16_t>* GetBuffer() { return &vecsAudioSndCrdStereo; }
|
||||
void VSTProcessCallback ( CVector<int16_t>& psData )
|
||||
void VSTProcessCallback()
|
||||
{
|
||||
CSoundBase::ProcessCallback ( psData );
|
||||
CSoundBase::ProcessCallback ( vecsTmpAudioSndCrdStereo );
|
||||
}
|
||||
|
||||
virtual int Init ( const int )
|
||||
{
|
||||
// init base class
|
||||
CSoundBase::Init ( iVSTMonoBufferSize );
|
||||
vecsTmpAudioSndCrdStereo.Init ( 2 * iVSTMonoBufferSize /* stereo */);
|
||||
return iVSTMonoBufferSize;
|
||||
}
|
||||
|
||||
// this vector must be accessible from the outside (quick hack solution)
|
||||
CVector<int16_t> vecsTmpAudioSndCrdStereo;
|
||||
|
||||
protected:
|
||||
int iVSTMonoBufferSize;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue