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

Unified Diff: Source/modules/webaudio/AudioScheduledSourceNode.h

Issue 54173005: Signal exceptions if start/stop is called out-of-order or too many times. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/modules/webaudio/AudioNode.cpp ('k') | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioScheduledSourceNode.h
diff --git a/Source/modules/webaudio/AudioScheduledSourceNode.h b/Source/modules/webaudio/AudioScheduledSourceNode.h
index b14e452965c508f20d26b2ea18564cc0f8ccfd1e..a0f975d375fb49130db4e12cc31e408e66ee5be3 100644
--- a/Source/modules/webaudio/AudioScheduledSourceNode.h
+++ b/Source/modules/webaudio/AudioScheduledSourceNode.h
@@ -68,11 +68,10 @@ public:
AudioScheduledSourceNode(AudioContext*, float sampleRate);
// Scheduling.
- void start(double when = 0);
- void stop(double when = 0);
-
- void noteOn(double when);
- void noteOff(double when);
+ void start(ExceptionState& es) { start(0.0, es); }
+ void start(double when, ExceptionState&);
+ void stop(ExceptionState& es) { stop(0.0, es); }
+ void stop(double when, ExceptionState&);
unsigned short playbackState() const { return static_cast<unsigned short>(m_playbackState); }
bool isPlayingOrScheduled() const { return m_playbackState == PLAYING_STATE || m_playbackState == SCHEDULED_STATE; }
@@ -110,6 +109,7 @@ protected:
double m_endTime; // in seconds
bool m_hasEndedListener;
+ bool m_stopCalled;
static const double UnknownTime;
};
« no previous file with comments | « Source/modules/webaudio/AudioNode.cpp ('k') | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698