summaryrefslogtreecommitdiffstats
path: root/media/libsoundtouch/src/TDStretch.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-11 14:15:49 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-11 14:15:49 +0100
commit823b9a4120813274849e68443ec43249b97add3e (patch)
tree0845f6a6ce06db041530948c5cbd4c347ba12866 /media/libsoundtouch/src/TDStretch.cpp
parent319d485e234dff3f59ac2e98ccf4c32a1aa43642 (diff)
parentcffb44547ae7997e5eaf71c644bd626eeb3bba00 (diff)
downloadUXP-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.cpp9
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)
{