mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +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:
parent
09d1ed4d25
commit
995c11bcf9
@ -178,9 +178,9 @@ int Resample::GetBestMethodDefault()
|
|||||||
|
|
||||||
Resample::Resample(bool useBestMethod, double minFactor, double maxFactor)
|
Resample::Resample(bool useBestMethod, double minFactor, double maxFactor)
|
||||||
{
|
{
|
||||||
if (minFactor < 1.0 / 12.0 || maxFactor > 12.0) {
|
if (!src_is_valid_ratio (minFactor) || !src_is_valid_ratio (maxFactor)) {
|
||||||
fprintf(stderr, "Libsamplerate only supports resampling factors\n");
|
fprintf(stderr, "libsamplerate supports only resampling factors between 1/SRC_MAX_RATIO and SRC_MAX_RATIO.\n");
|
||||||
fprintf(stderr, "between 1/12 and 12\n");
|
// FIXME: Audacity will hang after this if branch.
|
||||||
mHandle = NULL;
|
mHandle = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user