From 044c4a9a5442f84a2cbd7d38df983555314d0a2b Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 13 Jul 2008 10:56:40 +0000 Subject: [PATCH] bug fix --- windows/sound.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/windows/sound.cpp b/windows/sound.cpp index 1c180941..2fb89efe 100755 --- a/windows/sound.cpp +++ b/windows/sound.cpp @@ -565,15 +565,14 @@ ASIOTime* CSound::bufferSwitchTimeInfo ( ASIOTime *timeInfo, return 0L; } -void CSound::bufferSwitch ( long index, - ASIOBool processNow ) +void CSound::bufferSwitch ( long index, ASIOBool processNow ) { int iCurSample; ASIOMutex.lock(); // get mutex lock { // 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 ) { @@ -585,14 +584,14 @@ void CSound::bufferSwitch ( long index, { // copy interleaved stereo data in mono sound card buffer ((short*) bufferInfos[i].buffers[index])[iCurSample] = - psSoundcardBuffer[0][2 * iCurSample + bufferInfos[i].channelNum]; + psPlaybackBuffer[0][2 * iCurSample + bufferInfos[i].channelNum]; } } } else { // CAPTURE ----------------------------------------------------- - // first check if buffer is available + // first check if space in buffer is available if ( iInCurBlockToWrite < iCurNumSndBufIn ) { // copy new captured block in thread transfer buffer