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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBuffer.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/AudioBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp
index 294a59f0536253049358697418b8dfca28c54bce..ec303e8f8be4a02efb2420572d6325dc387e2540 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp
@@ -63,22 +63,24 @@ AudioBuffer* AudioBuffer::create(unsigned numberOfChannels,
if (!numberOfChannels ||
numberOfChannels > BaseAudioContext::maxNumberOfChannels()) {
exceptionState.throwDOMException(
- NotSupportedError, ExceptionMessages::indexOutsideRange(
- "number of channels", numberOfChannels, 1u,
- ExceptionMessages::InclusiveBound,
- BaseAudioContext::maxNumberOfChannels(),
- ExceptionMessages::InclusiveBound));
+ NotSupportedError,
+ ExceptionMessages::indexOutsideRange(
+ "number of channels", numberOfChannels, 1u,
+ ExceptionMessages::InclusiveBound,
+ BaseAudioContext::maxNumberOfChannels(),
+ ExceptionMessages::InclusiveBound));
return nullptr;
}
if (!AudioUtilities::isValidAudioBufferSampleRate(sampleRate)) {
exceptionState.throwDOMException(
- NotSupportedError, ExceptionMessages::indexOutsideRange(
- "sample rate", sampleRate,
- AudioUtilities::minAudioBufferSampleRate(),
- ExceptionMessages::InclusiveBound,
- AudioUtilities::maxAudioBufferSampleRate(),
- ExceptionMessages::InclusiveBound));
+ NotSupportedError,
+ ExceptionMessages::indexOutsideRange(
+ "sample rate", sampleRate,
+ AudioUtilities::minAudioBufferSampleRate(),
+ ExceptionMessages::InclusiveBound,
+ AudioUtilities::maxAudioBufferSampleRate(),
+ ExceptionMessages::InclusiveBound));
return nullptr;
}
@@ -95,9 +97,10 @@ AudioBuffer* AudioBuffer::create(unsigned numberOfChannels,
if (!audioBuffer) {
exceptionState.throwDOMException(
- NotSupportedError, "createBuffer(" + String::number(numberOfChannels) +
- ", " + String::number(numberOfFrames) + ", " +
- String::number(sampleRate) + ") failed.");
+ NotSupportedError,
+ "createBuffer(" + String::number(numberOfChannels) + ", " +
+ String::number(numberOfFrames) + ", " + String::number(sampleRate) +
+ ") failed.");
}
return audioBuffer;
@@ -187,9 +190,10 @@ DOMFloat32Array* AudioBuffer::getChannelData(unsigned channelIndex,
ExceptionState& exceptionState) {
if (channelIndex >= m_channels.size()) {
exceptionState.throwDOMException(
- IndexSizeError, "channel index (" + String::number(channelIndex) +
- ") exceeds number of channels (" +
- String::number(m_channels.size()) + ")");
+ IndexSizeError,
+ "channel index (" + String::number(channelIndex) +
+ ") exceeds number of channels (" +
+ String::number(m_channels.size()) + ")");
return nullptr;
}
@@ -216,11 +220,12 @@ void AudioBuffer::copyFromChannel(DOMFloat32Array* destination,
if (channelNumber < 0 ||
channelNumber >= static_cast<long>(m_channels.size())) {
exceptionState.throwDOMException(
- IndexSizeError, ExceptionMessages::indexOutsideRange(
- "channelNumber", channelNumber, 0L,
- ExceptionMessages::InclusiveBound,
- static_cast<long>(m_channels.size() - 1),
- ExceptionMessages::InclusiveBound));
+ IndexSizeError,
+ ExceptionMessages::indexOutsideRange(
+ "channelNumber", channelNumber, 0L,
+ ExceptionMessages::InclusiveBound,
+ static_cast<long>(m_channels.size() - 1),
+ ExceptionMessages::InclusiveBound));
return;
}
@@ -228,11 +233,12 @@ void AudioBuffer::copyFromChannel(DOMFloat32Array* destination,
if (startInChannel >= channelData->length()) {
exceptionState.throwDOMException(
- IndexSizeError, ExceptionMessages::indexOutsideRange(
- "startInChannel", startInChannel, 0UL,
- ExceptionMessages::InclusiveBound,
- static_cast<unsigned long>(channelData->length()),
- ExceptionMessages::ExclusiveBound));
+ IndexSizeError,
+ ExceptionMessages::indexOutsideRange(
+ "startInChannel", startInChannel, 0UL,
+ ExceptionMessages::InclusiveBound,
+ static_cast<unsigned long>(channelData->length()),
+ ExceptionMessages::ExclusiveBound));
return;
}
@@ -262,11 +268,12 @@ void AudioBuffer::copyToChannel(DOMFloat32Array* source,
if (channelNumber < 0 ||
channelNumber >= static_cast<long>(m_channels.size())) {
exceptionState.throwDOMException(
- IndexSizeError, ExceptionMessages::indexOutsideRange(
- "channelNumber", channelNumber, 0L,
- ExceptionMessages::InclusiveBound,
- static_cast<long>(m_channels.size() - 1),
- ExceptionMessages::InclusiveBound));
+ IndexSizeError,
+ ExceptionMessages::indexOutsideRange(
+ "channelNumber", channelNumber, 0L,
+ ExceptionMessages::InclusiveBound,
+ static_cast<long>(m_channels.size() - 1),
+ ExceptionMessages::InclusiveBound));
return;
}
@@ -274,11 +281,12 @@ void AudioBuffer::copyToChannel(DOMFloat32Array* source,
if (startInChannel >= channelData->length()) {
exceptionState.throwDOMException(
- IndexSizeError, ExceptionMessages::indexOutsideRange(
- "startInChannel", startInChannel, 0UL,
- ExceptionMessages::InclusiveBound,
- static_cast<unsigned long>(channelData->length()),
- ExceptionMessages::ExclusiveBound));
+ IndexSizeError,
+ ExceptionMessages::indexOutsideRange(
+ "startInChannel", startInChannel, 0UL,
+ ExceptionMessages::InclusiveBound,
+ static_cast<unsigned long>(channelData->length()),
+ ExceptionMessages::ExclusiveBound));
return;
}

Powered by Google App Engine
This is Rietveld 408576698