Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp

Issue 1803153002: Add min/max values for AudioParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
index ed2437638e4ba271e2ff09c98190ed1da9b06a50..ba019b98955c60771edd9f26e3d96d165f6280ca 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -583,7 +583,8 @@ void AudioBufferSourceHandler::handleStoppableSourceNode()
// ----------------------------------------------------------------
AudioBufferSourceNode::AudioBufferSourceNode(AbstractAudioContext& context, float sampleRate)
: AudioScheduledSourceNode(context)
- , m_playbackRate(AudioParam::create(context, ParamTypeAudioBufferSourcePlaybackRate, 1.0))
+ // Arbitrarily choose a limit of +/- Nyquist frequency for playback
hongchan 2016/05/13 01:30:14 Not arbitrarily - it is based on the spec. Right?
Raymond Toy 2016/05/13 17:06:15 Forgot to update it after it was decided to be unl
Raymond Toy 2016/05/13 18:40:32 Done.
+ , m_playbackRate(AudioParam::create(context, ParamTypeAudioBufferSourcePlaybackRate, 1.0, -sampleRate / 2, sampleRate / 2))
, m_detune(AudioParam::create(context, ParamTypeAudioBufferSourceDetune, 0.0))
{
setHandler(AudioBufferSourceHandler::create(*this, sampleRate, m_playbackRate->handler(), m_detune->handler()));

Powered by Google App Engine
This is Rietveld 408576698