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

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

Issue 2389253002: reflow comments in modules/{webaudio,vr} (Closed)
Patch Set: . Created 4 years, 2 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/AudioScheduledSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
index 8f35797679fdb3a9f368dd7ae44a324dedb7960c..f0e0584a57dce11bfd5f7236d53bffa84bcecf2f 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
@@ -72,7 +72,8 @@ void AudioScheduledSourceHandler::updateSchedulingInfo(
m_endTime == UnknownTime ? 0 : AudioUtilities::timeToSampleFrame(
m_endTime, sampleRate);
- // If we know the end time and it's already passed, then don't bother doing any more rendering this cycle.
+ // If we know the end time and it's already passed, then don't bother doing
+ // any more rendering this cycle.
if (m_endTime != UnknownTime && endFrame <= quantumStartFrame)
finish();
@@ -88,7 +89,8 @@ void AudioScheduledSourceHandler::updateSchedulingInfo(
// Check if it's time to start playing.
if (state == SCHEDULED_STATE) {
- // Increment the active source count only if we're transitioning from SCHEDULED_STATE to PLAYING_STATE.
+ // Increment the active source count only if we're transitioning from
+ // SCHEDULED_STATE to PLAYING_STATE.
setPlaybackState(PLAYING_STATE);
}
@@ -105,7 +107,8 @@ void AudioScheduledSourceHandler::updateSchedulingInfo(
}
// Handle silence before we start playing.
- // Zero any initial frames representing silence leading up to a rendering start time in the middle of the quantum.
+ // Zero any initial frames representing silence leading up to a rendering
+ // start time in the middle of the quantum.
if (quantumFrameOffset) {
for (unsigned i = 0; i < outputBus->numberOfChannels(); ++i)
memset(outputBus->channel(i)->mutableData(), 0,
@@ -113,8 +116,8 @@ void AudioScheduledSourceHandler::updateSchedulingInfo(
}
// Handle silence after we're done playing.
- // If the end time is somewhere in the middle of this time quantum, then zero out the
- // frames from the end time to the very end of the quantum.
+ // If the end time is somewhere in the middle of this time quantum, then zero
+ // out the frames from the end time to the very end of the quantum.
if (m_endTime != UnknownTime && endFrame >= quantumStartFrame &&
endFrame < quantumEndFrame) {
size_t zeroStartFrame = endFrame - quantumStartFrame;
@@ -162,13 +165,13 @@ void AudioScheduledSourceHandler::start(double when,
return;
}
- // The node is started. Add a reference to keep us alive so that audio will eventually get
- // played even if Javascript should drop all references to this node. The reference will get
- // dropped when the source has finished playing.
+ // The node is started. Add a reference to keep us alive so that audio will
+ // eventually get played even if Javascript should drop all references to this
+ // node. The reference will get dropped when the source has finished playing.
context()->notifySourceNodeStartedProcessing(node());
- // This synchronizes with process(). updateSchedulingInfo will read some of the variables being
- // set here.
+ // This synchronizes with process(). updateSchedulingInfo will read some of
+ // the variables being set here.
MutexLocker processLocker(m_processLock);
// If |when| < currentTime, the source must start now according to the spec.
@@ -198,9 +201,9 @@ void AudioScheduledSourceHandler::stop(double when,
// This synchronizes with process()
MutexLocker processLocker(m_processLock);
- // stop() can be called more than once, with the last call to stop taking effect, unless the
- // source has already stopped due to earlier calls to stop. No exceptions are thrown in any
- // case.
+ // stop() can be called more than once, with the last call to stop taking
+ // effect, unless the source has already stopped due to earlier calls to stop.
+ // No exceptions are thrown in any case.
when = std::max(0.0, when);
m_endTime = when;
}

Powered by Google App Engine
This is Rietveld 408576698