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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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/AudioParamTimeline.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
index e46fc6b058adca1cc363f4e874cc24d15a7241c2..732696cef1dbfa853a0b026f0c55e5939bb501bf 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
@@ -61,8 +61,9 @@ static bool isNonNegativeAudioParamTime(double time,
return true;
exceptionState.throwDOMException(
- InvalidAccessError, message + " must be a finite non-negative number: " +
- String::number(time));
+ InvalidAccessError,
+ message +
+ " must be a finite non-negative number: " + String::number(time));
return false;
}
@@ -495,8 +496,9 @@ void AudioParamTimeline::setValueCurveAtTime(DOMFloat32Array* curve,
if (curve->length() < 2) {
exceptionState.throwDOMException(
- InvalidStateError, ExceptionMessages::indexExceedsMinimumBound(
- "curve length", curve->length(), 2U));
+ InvalidStateError,
+ ExceptionMessages::indexExceedsMinimumBound("curve length",
+ curve->length(), 2U));
return;
}
@@ -536,8 +538,9 @@ void AudioParamTimeline::insertEvent(std::unique_ptr<ParamEvent> event,
event->getType() == ParamEvent::ExponentialRampToValue)) {
// There are no events preceding these ramps. Insert a new setValueAtTime
// event to set the starting point for these events.
- m_events.insert(0, AudioParamTimeline::ParamEvent::createSetValueEvent(
- event->initialValue(), event->callTime()));
+ m_events.insert(0,
+ AudioParamTimeline::ParamEvent::createSetValueEvent(
+ event->initialValue(), event->callTime()));
}
for (i = 0; i < m_events.size(); ++i) {
@@ -559,9 +562,10 @@ void AudioParamTimeline::insertEvent(std::unique_ptr<ParamEvent> event,
if (m_events[i]->getType() == ParamEvent::SetValueCurve) {
double endTime = m_events[i]->time() + m_events[i]->duration();
if (event->time() >= m_events[i]->time() && event->time() < endTime) {
- exceptionState.throwDOMException(
- NotSupportedError, eventToString(*event) + " overlaps " +
- eventToString(*m_events[i]));
+ exceptionState.throwDOMException(NotSupportedError,
+ eventToString(*event) +
+ " overlaps " +
+ eventToString(*m_events[i]));
return;
}
}
@@ -641,8 +645,9 @@ void AudioParamTimeline::cancelAndHoldAtTime(double cancelTime,
// If the event just before cancelTime is a SetTarget or SetValueCurve
// event, we need to handle that event specially instead of the event after.
- if (i > 0 && ((m_events[i - 1]->getType() == ParamEvent::SetTarget) ||
- (m_events[i - 1]->getType() == ParamEvent::SetValueCurve))) {
+ if (i > 0 &&
+ ((m_events[i - 1]->getType() == ParamEvent::SetTarget) ||
+ (m_events[i - 1]->getType() == ParamEvent::SetValueCurve))) {
cancelledEventIndex = i - 1;
} else if (i >= m_events.size()) {
// If there were no events occurring after |cancelTime| (and the
@@ -1381,8 +1386,9 @@ std::tuple<size_t, float, unsigned> AudioParamTimeline::processExponentialRamp(
// Compute the per-sample multiplier.
float multiplier = powf(value2 / value1, 1 / numSampleFrames);
// Set the starting value of the exponential ramp.
- value = value1 * powf(value2 / value1,
- (currentFrame / sampleRate - time1) / deltaTime);
+ value =
+ value1 *
+ powf(value2 / value1, (currentFrame / sampleRate - time1) / deltaTime);
for (; writeIndex < fillToFrame; ++writeIndex) {
values[writeIndex] = value;

Powered by Google App Engine
This is Rietveld 408576698