Index: third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
index 2d2eb9e133499f337487d4afde7eb6928352bf79..4e2d32c45f72363e1279dc1026ea49d261088fe4 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
@@ -161,12 +161,12 @@ void AudioParamHandler::calculateTimelineValues(float* values, unsigned numberOf |
// Calculate values for this render quantum. Normally numberOfValues will |
// equal to AudioHandler::ProcessingSizeInFrames (the render quantum size). |
hongchan
2015/09/30 22:14:18
Wouldn't it be better to have comments like: Using
Raymond Toy
2015/09/30 22:30:18
You want to add a comment that we're using frames
hongchan
2015/09/30 22:47:59
Yes, it might be confusing inside of some other co
Raymond Toy
2015/10/01 18:05:55
Since we're renaming valuesForTimeRange to valuesF
|
double sampleRate = context()->sampleRate(); |
- double startTime = context()->currentTime(); |
- double endTime = startTime + numberOfValues / sampleRate; |
+ size_t startFrame = context()->currentSampleFrame(); |
+ size_t endFrame = startFrame + numberOfValues; |
// Note we're running control rate at the sample-rate. |
// Pass in the current value as default value. |
- m_value = m_timeline.valuesForTimeRange(startTime, endTime, narrowPrecisionToFloat(m_value), values, numberOfValues, sampleRate, sampleRate); |
+ m_value = m_timeline.valuesForTimeRange(startFrame, endFrame, narrowPrecisionToFloat(m_value), values, numberOfValues, sampleRate, sampleRate); |
hongchan
2015/09/30 22:14:18
In my opinion, the method name with the word 'Time
Raymond Toy
2015/09/30 22:30:18
Renaming to valuesForFrameRange is fine with me.
hongchan
2015/09/30 22:47:59
I think there are few other methods named with "Ti
Raymond Toy
2015/10/01 18:05:55
I've renamed it everywhere, more or less.
|
} |
void AudioParamHandler::connect(AudioNodeOutput& output) |