mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 14:52:34 +02:00
Fix loop play again (error introduced at 46d7804)
This commit is contained in:
parent
6f7eaf7746
commit
871bc65c8e
@ -3827,7 +3827,7 @@ void AudioIO::FillBuffers()
|
|||||||
// The exception is if we're at the end of the selected
|
// The exception is if we're at the end of the selected
|
||||||
// region - then we should just fill the buffer.
|
// region - then we should just fill the buffer.
|
||||||
//
|
//
|
||||||
const auto realTimeRemaining = mPlaybackSchedule.RealTimeRemaining();
|
auto realTimeRemaining = mPlaybackSchedule.RealTimeRemaining();
|
||||||
if (nAvailable >= (int)mPlaybackSamplesToCopy ||
|
if (nAvailable >= (int)mPlaybackSamplesToCopy ||
|
||||||
(mPlaybackSchedule.PlayingStraight() &&
|
(mPlaybackSchedule.PlayingStraight() &&
|
||||||
nAvailable > 0 &&
|
nAvailable > 0 &&
|
||||||
@ -3869,6 +3869,7 @@ void AudioIO::FillBuffers()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
mPlaybackSchedule.RealTimeAdvance( deltat );
|
mPlaybackSchedule.RealTimeAdvance( deltat );
|
||||||
|
realTimeRemaining = mPlaybackSchedule.RealTimeRemaining();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!progress)
|
if (!progress)
|
||||||
@ -3970,11 +3971,12 @@ void AudioIO::FillBuffers()
|
|||||||
done = !progress || (available == 0);
|
done = !progress || (available == 0);
|
||||||
// msmeyer: If playing looped, check if we are at the end of the buffer
|
// msmeyer: If playing looped, check if we are at the end of the buffer
|
||||||
// and if yes, restart from the beginning.
|
// and if yes, restart from the beginning.
|
||||||
if (mPlaybackSchedule.RealTimeRemaining() <= 0)
|
if (realTimeRemaining <= 0)
|
||||||
{
|
{
|
||||||
for (i = 0; i < mPlaybackTracks.size(); i++)
|
for (i = 0; i < mPlaybackTracks.size(); i++)
|
||||||
mPlaybackMixers[i]->Restart();
|
mPlaybackMixers[i]->Restart();
|
||||||
mPlaybackSchedule.RealTimeRestart();
|
mPlaybackSchedule.RealTimeRestart();
|
||||||
|
realTimeRemaining = mPlaybackSchedule.RealTimeRemaining();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user