Bug 2025: Windows: Wasapi: seek commands can cause crash

Problem: With host set to WASAPI: if the playback position is less that about ten seconds before the end of any of the tracks and the user presses one of the left/arrow keys to seek, then a bug alert appears, and it's seems like it's impossible to recover from this.

libsoxr 0.1.3, first used in Audacity 2.3.0, crashes with constant rate resampling if you try to reuse the resampler after it has flushed.

Fix: work around which is the same as used for bug 1887 - recreate resamplers, rather than reusing them.
This commit is contained in:
David Bailes 2018-11-07 14:58:12 +00:00
parent 03e67b9bcd
commit 03b0d3f89a
1 changed files with 6 additions and 0 deletions

View File

@ -724,6 +724,12 @@ void Mixer::Reposition(double t)
mQueueStart[i] = 0;
mQueueLen[i] = 0;
}
// Bug 2025: libsoxr 0.1.3, first used in Audacity 2.3.0, crashes with
// 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();
}
void Mixer::SetTimesAndSpeed(double t0, double t1, double speed)