1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

bug 1839 - Consistent recording behavior

Same behavior whether there is playback or not.
This commit is contained in:
Steve Daulton
2018-02-28 21:19:33 +00:00
parent 1412f21f66
commit 1ef4d73629
3 changed files with 26 additions and 13 deletions

View File

@@ -5065,7 +5065,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
#endif
callbackReturn = paComplete;
}
if (cut) // no samples to process, they've been discarded
continue;
@@ -5116,8 +5116,8 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
// Poke: If there are no playback tracks, then the earlier check
// about the time indicator being passed the end won't happen;
// do it here instead (but not if looping or scrubbing)
if (numPlaybackTracks == 0
&& gAudioIO->mPlayMode == AudioIO::PLAY_STRAIGHT)
if (numPlaybackTracks == 0 &&
gAudioIO->mPlayMode == AudioIO::PLAY_STRAIGHT)
{
if ((gAudioIO->ReversedTime()
? gAudioIO->mTime <= gAudioIO->mT1
@@ -5176,6 +5176,12 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
if( inputBuffer && (numCaptureChannels > 0) )
{
// If there are no playback tracks, and we are recording, then the
// earlier checks for being passed the end won't happen, so do it here.
if (gAudioIO->mTime >= gAudioIO->mT1) {
callbackReturn = paComplete;
}
// The error likely from a too-busy CPU falling behind real-time data
// is paInputOverflow
bool inputError =