bug fix
This commit is contained in:
parent
6de84e8c6f
commit
044c4a9a54
1 changed files with 4 additions and 5 deletions
|
@ -565,15 +565,14 @@ ASIOTime* CSound::bufferSwitchTimeInfo ( ASIOTime *timeInfo,
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSound::bufferSwitch ( long index,
|
void CSound::bufferSwitch ( long index, ASIOBool processNow )
|
||||||
ASIOBool processNow )
|
|
||||||
{
|
{
|
||||||
int iCurSample;
|
int iCurSample;
|
||||||
|
|
||||||
ASIOMutex.lock(); // get mutex lock
|
ASIOMutex.lock(); // get mutex lock
|
||||||
{
|
{
|
||||||
// perform the processing for input and output
|
// perform the processing for input and output
|
||||||
for ( int i = 0; i < 2 * NUM_IN_OUT_CHANNELS; i++ )
|
for ( int i = 0; i < 2 * NUM_IN_OUT_CHANNELS; i++ ) // stereo
|
||||||
{
|
{
|
||||||
if ( bufferInfos[i].isInput == ASIOFalse )
|
if ( bufferInfos[i].isInput == ASIOFalse )
|
||||||
{
|
{
|
||||||
|
@ -585,14 +584,14 @@ void CSound::bufferSwitch ( long index,
|
||||||
{
|
{
|
||||||
// copy interleaved stereo data in mono sound card buffer
|
// copy interleaved stereo data in mono sound card buffer
|
||||||
((short*) bufferInfos[i].buffers[index])[iCurSample] =
|
((short*) bufferInfos[i].buffers[index])[iCurSample] =
|
||||||
psSoundcardBuffer[0][2 * iCurSample + bufferInfos[i].channelNum];
|
psPlaybackBuffer[0][2 * iCurSample + bufferInfos[i].channelNum];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// CAPTURE -----------------------------------------------------
|
// CAPTURE -----------------------------------------------------
|
||||||
// first check if buffer is available
|
// first check if space in buffer is available
|
||||||
if ( iInCurBlockToWrite < iCurNumSndBufIn )
|
if ( iInCurBlockToWrite < iCurNumSndBufIn )
|
||||||
{
|
{
|
||||||
// copy new captured block in thread transfer buffer
|
// copy new captured block in thread transfer buffer
|
||||||
|
|
Loading…
Reference in a new issue