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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.h

Issue 2623063002: Revert of Sub-sample accurate start of OscillatorNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Get frame information for the current time quantum. 81 // Get frame information for the current time quantum.
82 // We handle the transition into PLAYING_STATE and FINISHED_STATE here, 82 // We handle the transition into PLAYING_STATE and FINISHED_STATE here,
83 // zeroing out portions of the outputBus which are outside the range of 83 // zeroing out portions of the outputBus which are outside the range of
84 // startFrame and endFrame. 84 // startFrame and endFrame.
85 // 85 //
86 // Each frame time is relative to the context's currentSampleFrame(). 86 // Each frame time is relative to the context's currentSampleFrame().
87 // quantumFrameOffset : Offset frame in this time quantum to start 87 // quantumFrameOffset : Offset frame in this time quantum to start
88 // rendering. 88 // rendering.
89 // nonSilentFramesToProcess : Number of frames rendering non-silence (will be 89 // nonSilentFramesToProcess : Number of frames rendering non-silence (will be
90 // <= quantumFrameSize). 90 // <= quantumFrameSize).
91 // startFrameOffset : The fractional frame offset from quantumFrameOffset
92 // and the actual starting time of the source. This is
93 // non-zero only when transitioning from the
94 // SCHEDULED_STATE to the PLAYING_STATE.
95 void updateSchedulingInfo(size_t quantumFrameSize, 91 void updateSchedulingInfo(size_t quantumFrameSize,
96 AudioBus* outputBus, 92 AudioBus* outputBus,
97 size_t& quantumFrameOffset, 93 size_t& quantumFrameOffset,
98 size_t& nonSilentFramesToProcess, 94 size_t& nonSilentFramesToProcess);
99 double& startFrameOffset);
100 95
101 // Called when we have no more sound to play or the stop() time has been 96 // Called when we have no more sound to play or the stop() time has been
102 // reached. No onEnded event is called. 97 // reached. No onEnded event is called.
103 virtual void finishWithoutOnEnded(); 98 virtual void finishWithoutOnEnded();
104 99
105 // Like finishWithoutOnEnded(), but an onEnded (if specified) is called. 100 // Like finishWithoutOnEnded(), but an onEnded (if specified) is called.
106 virtual void finish(); 101 virtual void finish();
107 102
108 void notifyEnded(); 103 void notifyEnded();
109 104
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 DEFINE_INLINE_VIRTUAL_TRACE() { AudioNode::trace(visitor); } 145 DEFINE_INLINE_VIRTUAL_TRACE() { AudioNode::trace(visitor); }
151 146
152 protected: 147 protected:
153 explicit AudioScheduledSourceNode(BaseAudioContext&); 148 explicit AudioScheduledSourceNode(BaseAudioContext&);
154 AudioScheduledSourceHandler& audioScheduledSourceHandler() const; 149 AudioScheduledSourceHandler& audioScheduledSourceHandler() const;
155 }; 150 };
156 151
157 } // namespace blink 152 } // namespace blink
158 153
159 #endif // AudioScheduledSourceNode_h 154 #endif // AudioScheduledSourceNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698