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

Unified Diff: Source/modules/webaudio/AudioNode.cpp

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.h ('k') | Source/modules/webaudio/AudioScheduledSourceNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioNode.cpp
diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp
index e94a693a967d19cc49464108345cae15a86bcd02..f8f9e773cd98466b65d290edea7b0e3846efa9b2 100644
--- a/Source/modules/webaudio/AudioNode.cpp
+++ b/Source/modules/webaudio/AudioNode.cpp
@@ -86,6 +86,51 @@ void AudioNode::uninitialize()
m_isInitialized = false;
}
+String AudioNode::nodeTypeName() const
+{
+ switch (m_nodeType) {
+ case NodeTypeDestination:
+ return "AudioDestinationNode";
+ case NodeTypeOscillator:
+ return "OscillatorNode";
+ case NodeTypeAudioBufferSource:
+ return "AudioBufferSourceNode";
+ case NodeTypeMediaElementAudioSource:
+ return "MediaElementAudioSourceNode";
+ case NodeTypeMediaStreamAudioDestination:
+ return "MediaStreamAudioDestinationNode";
+ case NodeTypeMediaStreamAudioSource:
+ return "MediaStreamAudioSourceNode";
+ case NodeTypeJavaScript:
+ return "ScriptProcessorNode";
+ case NodeTypeBiquadFilter:
+ return "BiquadFilterNode";
+ case NodeTypePanner:
+ return "PannerNode";
+ case NodeTypeConvolver:
+ return "ConvolverNode";
+ case NodeTypeDelay:
+ return "DelayNode";
+ case NodeTypeGain:
+ return "GainNode";
+ case NodeTypeChannelSplitter:
+ return "ChannelSplitterNode";
+ case NodeTypeChannelMerger:
+ return "ChannelMergerNode";
+ case NodeTypeAnalyser:
+ return "AnalyserNode";
+ case NodeTypeDynamicsCompressor:
+ return "DynamicsCompressorNode";
+ case NodeTypeWaveShaper:
+ return "WaveShaperNode";
+ case NodeTypeUnknown:
+ case NodeTypeEnd:
+ default:
+ ASSERT_NOT_REACHED();
+ return "UnknownNode";
+ }
+}
+
void AudioNode::setNodeType(NodeType type)
{
m_nodeType = type;
« no previous file with comments | « Source/modules/webaudio/AudioNode.h ('k') | Source/modules/webaudio/AudioScheduledSourceNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698