mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Fix for http://bugzilla.audacityteam.org/show_bug.cgi?id=630 based on investigation by Gabriel Pato.
This is quite an involved piece of code, and to check it is OK it should be checked with mixtures of stereo and mono, looped and non looped, selected region, no selected region. (I did, but no harm trying variations on that). Real time effects, if enabled, could also potentially interact with this, and are subject to change in this area of code.
This commit is contained in:
parent
cae6669275
commit
17207fa39a
@ -3540,18 +3540,22 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
||||
|
||||
#define ORIGINAL_DO_NOT_PLAY_ALL_MUTED_TRACKS_TO_END
|
||||
#ifdef ORIGINAL_DO_NOT_PLAY_ALL_MUTED_TRACKS_TO_END
|
||||
int len = 0;
|
||||
// this is original code prior to r10680 -RBD
|
||||
if (cut)
|
||||
{
|
||||
gAudioIO->mPlaybackBuffers[t]->Discard(framesPerBuffer);
|
||||
continue;
|
||||
// keep going here.
|
||||
// we may still need to issue a paComplete.
|
||||
}
|
||||
|
||||
int len = gAudioIO->mPlaybackBuffers[t]->Get((samplePtr)tempBufs[chanCnt],
|
||||
else
|
||||
{
|
||||
len = gAudioIO->mPlaybackBuffers[t]->Get((samplePtr)tempBufs[chanCnt],
|
||||
floatSample,
|
||||
(int)framesPerBuffer);
|
||||
|
||||
chanCnt++;
|
||||
}
|
||||
|
||||
|
||||
if (linkFlag)
|
||||
{
|
||||
@ -3582,6 +3586,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
||||
#endif
|
||||
|
||||
#if defined(EXPERIMENTAL_REALTIME_EFFECTS)
|
||||
if( !cut )
|
||||
len = EffectManager::Get().RealtimeProcess(group++, chanCnt, rate, tempBufs, len);
|
||||
#endif
|
||||
// If our buffer is empty and the time indicator is past
|
||||
@ -3593,10 +3598,10 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
||||
{
|
||||
callbackReturn = paComplete;
|
||||
}
|
||||
#ifndef ORIGINAL_DO_NOT_PLAY_ALL_MUTED_TRACKS_TO_END
|
||||
|
||||
if (cut) // no samples to process, they've been discarded
|
||||
continue;
|
||||
#endif
|
||||
|
||||
for (int c = 0; c < chanCnt; c++)
|
||||
{
|
||||
vt = chans[c];
|
||||
|
Loading…
x
Reference in New Issue
Block a user