diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-11 14:15:49 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-11 14:15:49 +0100 |
commit | 823b9a4120813274849e68443ec43249b97add3e (patch) | |
tree | 0845f6a6ce06db041530948c5cbd4c347ba12866 /media/libsoundtouch/src/TDStretch.cpp | |
parent | 319d485e234dff3f59ac2e98ccf4c32a1aa43642 (diff) | |
parent | cffb44547ae7997e5eaf71c644bd626eeb3bba00 (diff) | |
download | UXP-823b9a4120813274849e68443ec43249b97add3e.tar UXP-823b9a4120813274849e68443ec43249b97add3e.tar.gz UXP-823b9a4120813274849e68443ec43249b97add3e.tar.lz UXP-823b9a4120813274849e68443ec43249b97add3e.tar.xz UXP-823b9a4120813274849e68443ec43249b97add3e.zip |
Merge branch 'release' into Pale_Moon-release
Diffstat (limited to 'media/libsoundtouch/src/TDStretch.cpp')
-rw-r--r-- | media/libsoundtouch/src/TDStretch.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libsoundtouch/src/TDStretch.cpp b/media/libsoundtouch/src/TDStretch.cpp index 81bde22f0..b955bfc96 100644 --- a/media/libsoundtouch/src/TDStretch.cpp +++ b/media/libsoundtouch/src/TDStretch.cpp @@ -126,8 +126,13 @@ void TDStretch::setParameters(int aSampleRate, int aSequenceMS, int aSeekWindowMS, int aOverlapMS) { // accept only positive parameter values - if zero or negative, use old values instead - if (aSampleRate > 0) this->sampleRate = aSampleRate; - if (aOverlapMS > 0) this->overlapMs = aOverlapMS; + if (aSampleRate > 0) + { + if (aSampleRate > 192000) ST_THROW_RT_ERROR("Error: Excessive samplerate"); + this->sampleRate = aSampleRate; + } + + if (aOverlapMS > 0) this->overlapMs = aOverlapMS; if (aSequenceMS > 0) { |