mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-06 17:13:49 +01:00
Bug 2045 - Clicky playback with Play-at-Speed and Scrubbing/Seeking
This commit is contained in:
@@ -5543,7 +5543,8 @@ PaStreamCallbackResult AudioIoCallback::CallbackDoSeek()
|
||||
// Reset mixer positions and flush buffers for all tracks
|
||||
for (size_t i = 0; i < numPlaybackTracks; i++)
|
||||
{
|
||||
mPlaybackMixers[i]->Reposition( time );
|
||||
const bool skipping = true;
|
||||
mPlaybackMixers[i]->Reposition( time, skipping );
|
||||
const auto toDiscard =
|
||||
mPlaybackBuffers[i]->AvailForGet();
|
||||
const auto discarded =
|
||||
|
||||
@@ -710,7 +710,7 @@ void Mixer::Restart()
|
||||
MakeResamplers();
|
||||
}
|
||||
|
||||
void Mixer::Reposition(double t)
|
||||
void Mixer::Reposition(double t, bool bSkipping)
|
||||
{
|
||||
mTime = t;
|
||||
const bool backwards = (mT1 < mT0);
|
||||
@@ -729,7 +729,8 @@ void Mixer::Reposition(double t)
|
||||
// constant rate resampling if you try to reuse the resampler after it has
|
||||
// flushed. Should that be considered a bug in sox? This works around it.
|
||||
// (See also bug 1887, and the same work around in Mixer::Restart().)
|
||||
MakeResamplers();
|
||||
if( bSkipping )
|
||||
MakeResamplers();
|
||||
}
|
||||
|
||||
void Mixer::SetTimesAndSpeed(double t0, double t1, double speed)
|
||||
|
||||
@@ -131,7 +131,7 @@ class AUDACITY_DLL_API Mixer {
|
||||
|
||||
/// Reposition processing to absolute time next time
|
||||
/// Process() is called.
|
||||
void Reposition(double t);
|
||||
void Reposition(double t, bool bSkipping = false);
|
||||
|
||||
// Used in scrubbing.
|
||||
void SetTimesAndSpeed(double t0, double t1, double speed);
|
||||
|
||||
Reference in New Issue
Block a user