1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-02 08:03:48 +02:00

Bug 190 (P3) - Audacity crashes at slow playback speeds when using libsamplerate

Commit Benjamin's latest patch (with slight rewordings so that if SRC_MAX_RATIO changes again, we don't have to rewrite this message. 

Fix looks correct (although partial) to me and USE_LIBSAMPLERATE is off by default anyway.
This commit is contained in:
v.audacity 2011-03-25 21:43:49 +00:00
parent 09d1ed4d25
commit 995c11bcf9

View File

@ -178,9 +178,9 @@ int Resample::GetBestMethodDefault()
Resample::Resample(bool useBestMethod, double minFactor, double maxFactor)
{
if (minFactor < 1.0 / 12.0 || maxFactor > 12.0) {
fprintf(stderr, "Libsamplerate only supports resampling factors\n");
fprintf(stderr, "between 1/12 and 12\n");
if (!src_is_valid_ratio (minFactor) || !src_is_valid_ratio (maxFactor)) {
fprintf(stderr, "libsamplerate supports only resampling factors between 1/SRC_MAX_RATIO and SRC_MAX_RATIO.\n");
// FIXME: Audacity will hang after this if branch.
mHandle = NULL;
return;
}