1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-17 17:17:40 +02:00

Bug1104: When one stereo channel is shorter, don't stop playback at its end.

This commit is contained in:
Paul Licameli 2016-01-31 15:19:47 -05:00
parent c51ddd6c1d
commit 0b5e35003f

View File

@ -4224,8 +4224,8 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
(int)framesPerBuffer); (int)framesPerBuffer);
chanCnt++; chanCnt++;
} }
// There should not be a difference of len in different loop passes... // There can be a difference of len in different loop passes if one channel
// but anyway take a max. // of a stereo track ends before the other! Take a max!
maxLen = std::max(maxLen, len); maxLen = std::max(maxLen, len);
@ -4257,6 +4257,9 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
} }
#endif #endif
// Last channel seen now
len = maxLen;
if( !cut && selected ) if( !cut && selected )
{ {
len = em.RealtimeProcess(group, chanCnt, tempBufs, len); len = em.RealtimeProcess(group, chanCnt, tempBufs, len);