webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WebCore::AudioNode Class Referenceabstract

#include <AudioNode.h>

Inheritance diagram for WebCore::AudioNode:
WebCore::EventTargetWithInlineData WebCore::EventTarget WebCore::EventTarget WebCore::ScriptWrappable WebCore::ScriptWrappable WebCore::ScriptWrappable WebCore::ScriptWrappable WebCore::AudioBasicInspectorNode WebCore::AudioBasicProcessorNode WebCore::AudioDestinationNode WebCore::AudioScheduledSourceNode WebCore::ChannelMergerNode WebCore::ChannelSplitterNode WebCore::ConvolverNode WebCore::DynamicsCompressorNode WebCore::GainNode WebCore::ScriptProcessorNode

Public Types

enum  { ProcessingSizeInFrames = 128 }
 
enum  NodeType {
  NodeTypeUnknown, NodeTypeDestination, NodeTypeOscillator, NodeTypeAudioBufferSource,
  NodeTypeMediaElementAudioSource, NodeTypeMediaStreamAudioDestination, NodeTypeMediaStreamAudioSource, NodeTypeJavaScript,
  NodeTypeBiquadFilter, NodeTypePanner, NodeTypeConvolver, NodeTypeDelay,
  NodeTypeGain, NodeTypeChannelSplitter, NodeTypeChannelMerger, NodeTypeAnalyser,
  NodeTypeDynamicsCompressor, NodeTypeWaveShaper, NodeTypeEnd
}
 
enum  ChannelCountMode { Max, ClampedMax, Explicit }
 
enum  RefType { RefTypeNormal, RefTypeConnection }
 
- Public Types inherited from WebCore::EventTarget
using AddEventListenerOptionsOrBoolean = Variant< AddEventListenerOptions, bool >
 
using ListenerOptionsOrBoolean = Variant< ListenerOptions, bool >
 
using AddEventListenerOptionsOrBoolean = Variant< AddEventListenerOptions, bool >
 
using ListenerOptionsOrBoolean = Variant< ListenerOptions, bool >
 

Public Member Functions

 AudioNode (AudioContext &, float sampleRate)
 
virtual ~AudioNode ()
 
AudioContextcontext ()
 
const AudioContextcontext () const
 
NodeType nodeType () const
 
void setNodeType (NodeType)
 
void ref (RefType refType=RefTypeNormal)
 
void deref (RefType refType=RefTypeNormal)
 
void finishDeref (RefType refType)
 
virtual void process (size_t framesToProcess)=0
 
virtual void reset ()=0
 
virtual void initialize ()
 
virtual void uninitialize ()
 
bool isInitialized () const
 
void lazyInitialize ()
 
unsigned numberOfInputs () const
 
unsigned numberOfOutputs () const
 
AudioNodeInputinput (unsigned)
 
AudioNodeOutputoutput (unsigned)
 
virtual ExceptionOr< voidconnect (AudioNode &, unsigned outputIndex, unsigned inputIndex)
 
ExceptionOr< voidconnect (AudioParam &, unsigned outputIndex)
 
virtual ExceptionOr< voiddisconnect (unsigned outputIndex)
 
virtual float sampleRate () const
 
void processIfNecessary (size_t framesToProcess)
 
virtual void checkNumberOfChannelsForInput (AudioNodeInput *)
 
bool isMarkedForDeletion () const
 
virtual double tailTime () const =0
 
virtual double latencyTime () const =0
 
virtual bool propagatesSilence () const
 
bool inputsAreSilent ()
 
void silenceOutputs ()
 
void unsilenceOutputs ()
 
void enableOutputsIfNecessary ()
 
void disableOutputsIfNecessary ()
 
unsigned channelCount ()
 
virtual ExceptionOr< voidsetChannelCount (unsigned)
 
String channelCountMode ()
 
ExceptionOr< voidsetChannelCountMode (const String &)
 
String channelInterpretation ()
 
ExceptionOr< voidsetChannelInterpretation (const String &)
 
ChannelCountMode internalChannelCountMode () const
 
AudioBus::ChannelInterpretation internalChannelInterpretation () const
 
EventTargetInterface eventTargetInterface () const override
 
ScriptExecutionContextscriptExecutionContext () const final
 
- Public Member Functions inherited from WebCore::EventTarget
void ref ()
 
void deref ()
 
virtual NodetoNode ()
 
virtual DOMWindowtoDOMWindow ()
 
virtual bool isMessagePort () const
 
WEBCORE_EXPORT void addEventListenerForBindings (const AtomicString &eventType, RefPtr< EventListener > &&, AddEventListenerOptionsOrBoolean &&)
 
WEBCORE_EXPORT void removeEventListenerForBindings (const AtomicString &eventType, RefPtr< EventListener > &&, ListenerOptionsOrBoolean &&)
 
WEBCORE_EXPORT ExceptionOr< bool > dispatchEventForBindings (Event &)
 
virtual bool addEventListener (const AtomicString &eventType, Ref< EventListener > &&, const AddEventListenerOptions &={ })
 
virtual bool removeEventListener (const AtomicString &eventType, EventListener &, const ListenerOptions &)
 
virtual void removeAllEventListeners ()
 
virtual bool dispatchEvent (Event &)
 
virtual void uncaughtExceptionInEventHandler ()
 
bool setAttributeEventListener (const AtomicString &eventType, RefPtr< EventListener > &&)
 
EventListenerattributeEventListener (const AtomicString &eventType)
 
bool hasEventListeners () const
 
bool hasEventListeners (const AtomicString &eventType) const
 
bool hasCapturingEventListeners (const AtomicString &eventType)
 
bool hasActiveEventListeners (const AtomicString &eventType) const
 
const EventListenerVectoreventListeners (const AtomicString &eventType)
 
bool fireEventListeners (Event &)
 
bool isFiringEventListeners () const
 
void visitJSEventListeners (JSC::SlotVisitor &)
 
void invalidateJSEventListeners (JSC::JSObject *)
 
void ref ()
 
void deref ()
 
virtual NodetoNode ()
 
virtual DOMWindowtoDOMWindow ()
 
virtual bool isMessagePort () const
 
WEBCORE_EXPORT void addEventListenerForBindings (const AtomicString &eventType, RefPtr< EventListener > &&, AddEventListenerOptionsOrBoolean &&)
 
WEBCORE_EXPORT void removeEventListenerForBindings (const AtomicString &eventType, RefPtr< EventListener > &&, ListenerOptionsOrBoolean &&)
 
WEBCORE_EXPORT ExceptionOr< bool > dispatchEventForBindings (Event &)
 
virtual bool addEventListener (const AtomicString &eventType, Ref< EventListener > &&, const AddEventListenerOptions &={ })
 
virtual bool removeEventListener (const AtomicString &eventType, EventListener &, const ListenerOptions &)
 
virtual void removeAllEventListeners ()
 
virtual bool dispatchEvent (Event &)
 
virtual void uncaughtExceptionInEventHandler ()
 
bool setAttributeEventListener (const AtomicString &eventType, RefPtr< EventListener > &&)
 
EventListenerattributeEventListener (const AtomicString &eventType)
 
bool hasEventListeners () const
 
bool hasEventListeners (const AtomicString &eventType) const
 
bool hasCapturingEventListeners (const AtomicString &eventType)
 
bool hasActiveEventListeners (const AtomicString &eventType) const
 
const EventListenerVectoreventListeners (const AtomicString &eventType)
 
bool fireEventListeners (Event &)
 
bool isFiringEventListeners () const
 
void visitJSEventListeners (JSC::SlotVisitor &)
 
void invalidateJSEventListeners (JSC::JSObject *)
 
- Public Member Functions inherited from WebCore::ScriptWrappable
JSDOMObjectwrapper () const
 
void setWrapper (JSDOMObject *, JSC::WeakHandleOwner *, void *)
 
void clearWrapper (JSDOMObject *)
 
JSDOMObjectwrapper () const
 
void setWrapper (JSDOMObject *, JSC::WeakHandleOwner *, void *)
 
void clearWrapper (JSDOMObject *)
 

Protected Member Functions

void addInput (std::unique_ptr< AudioNodeInput >)
 
void addOutput (std::unique_ptr< AudioNodeOutput >)
 
virtual void pullInputs (size_t framesToProcess)
 
void updateChannelsForInputs ()
 
- Protected Member Functions inherited from WebCore::EventTargetWithInlineData
EventTargetDataeventTargetData () final
 
EventTargetDataeventTargetDataConcurrently () final
 
EventTargetDataensureEventTargetData () final
 
EventTargetDataeventTargetData () final
 
EventTargetDataeventTargetDataConcurrently () final
 
EventTargetDataensureEventTargetData () final
 
- Protected Member Functions inherited from WebCore::EventTarget
virtual ~EventTarget ()=default
 
const EventTargetDataeventTargetData () const
 
virtual ~EventTarget ()=default
 
const EventTargetDataeventTargetData () const
 
- Protected Member Functions inherited from WebCore::ScriptWrappable
 ~ScriptWrappable ()
 
 ~ScriptWrappable ()
 

Protected Attributes

unsigned m_channelCount
 
ChannelCountMode m_channelCountMode
 
AudioBus::ChannelInterpretation m_channelInterpretation
 

Additional Inherited Members

- Static Public Member Functions inherited from WebCore::ScriptWrappable
template<typename Derived >
static ptrdiff_t offsetOfWrapper ()
 
template<typename Derived >
static ptrdiff_t offsetOfWrapper ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ProcessingSizeInFrames 

◆ ChannelCountMode

Enumerator
Max 
ClampedMax 
Explicit 

◆ NodeType

Enumerator
NodeTypeUnknown 
NodeTypeDestination 
NodeTypeOscillator 
NodeTypeAudioBufferSource 
NodeTypeMediaElementAudioSource 
NodeTypeMediaStreamAudioDestination 
NodeTypeMediaStreamAudioSource 
NodeTypeJavaScript 
NodeTypeBiquadFilter 
NodeTypePanner 
NodeTypeConvolver 
NodeTypeDelay 
NodeTypeGain 
NodeTypeChannelSplitter 
NodeTypeChannelMerger 
NodeTypeAnalyser 
NodeTypeDynamicsCompressor 
NodeTypeWaveShaper 
NodeTypeEnd 

◆ RefType

Enumerator
RefTypeNormal 
RefTypeConnection 

Constructor & Destructor Documentation

◆ AudioNode()

WebCore::AudioNode::AudioNode ( AudioContext ,
float  sampleRate 
)

◆ ~AudioNode()

virtual WebCore::AudioNode::~AudioNode ( )
virtual

Member Function Documentation

◆ addInput()

void WebCore::AudioNode::addInput ( std::unique_ptr< AudioNodeInput )
protected

◆ addOutput()

void WebCore::AudioNode::addOutput ( std::unique_ptr< AudioNodeOutput )
protected

◆ channelCount()

unsigned WebCore::AudioNode::channelCount ( )

◆ channelCountMode()

String WebCore::AudioNode::channelCountMode ( )

◆ channelInterpretation()

String WebCore::AudioNode::channelInterpretation ( )

◆ checkNumberOfChannelsForInput()

virtual void WebCore::AudioNode::checkNumberOfChannelsForInput ( AudioNodeInput )
virtual

◆ connect() [1/2]

virtual ExceptionOr<void> WebCore::AudioNode::connect ( AudioNode ,
unsigned  outputIndex,
unsigned  inputIndex 
)
virtual

◆ connect() [2/2]

ExceptionOr<void> WebCore::AudioNode::connect ( AudioParam ,
unsigned  outputIndex 
)

◆ context() [1/2]

AudioContext& WebCore::AudioNode::context ( )
inline

◆ context() [2/2]

const AudioContext& WebCore::AudioNode::context ( ) const
inline

◆ deref()

void WebCore::AudioNode::deref ( RefType  refType = RefTypeNormal)

◆ disableOutputsIfNecessary()

void WebCore::AudioNode::disableOutputsIfNecessary ( )

◆ disconnect()

virtual ExceptionOr<void> WebCore::AudioNode::disconnect ( unsigned  outputIndex)
virtual

◆ enableOutputsIfNecessary()

void WebCore::AudioNode::enableOutputsIfNecessary ( )

◆ eventTargetInterface()

EventTargetInterface WebCore::AudioNode::eventTargetInterface ( ) const
overridevirtual

Implements WebCore::EventTarget.

◆ finishDeref()

void WebCore::AudioNode::finishDeref ( RefType  refType)

◆ initialize()

virtual void WebCore::AudioNode::initialize ( )
virtual

◆ input()

AudioNodeInput* WebCore::AudioNode::input ( unsigned  )

◆ inputsAreSilent()

bool WebCore::AudioNode::inputsAreSilent ( )

◆ internalChannelCountMode()

ChannelCountMode WebCore::AudioNode::internalChannelCountMode ( ) const
inline

◆ internalChannelInterpretation()

AudioBus::ChannelInterpretation WebCore::AudioNode::internalChannelInterpretation ( ) const
inline

◆ isInitialized()

bool WebCore::AudioNode::isInitialized ( ) const
inline

◆ isMarkedForDeletion()

bool WebCore::AudioNode::isMarkedForDeletion ( ) const
inline

◆ latencyTime()

virtual double WebCore::AudioNode::latencyTime ( ) const
pure virtual

◆ lazyInitialize()

void WebCore::AudioNode::lazyInitialize ( )

◆ nodeType()

NodeType WebCore::AudioNode::nodeType ( ) const
inline

◆ numberOfInputs()

unsigned WebCore::AudioNode::numberOfInputs ( ) const
inline

◆ numberOfOutputs()

unsigned WebCore::AudioNode::numberOfOutputs ( ) const
inline

◆ output()

AudioNodeOutput* WebCore::AudioNode::output ( unsigned  )

◆ process()

virtual void WebCore::AudioNode::process ( size_t  framesToProcess)
pure virtual

◆ processIfNecessary()

void WebCore::AudioNode::processIfNecessary ( size_t  framesToProcess)

◆ propagatesSilence()

virtual bool WebCore::AudioNode::propagatesSilence ( ) const
virtual

Reimplemented in WebCore::AudioBufferSourceNode.

◆ pullInputs()

virtual void WebCore::AudioNode::pullInputs ( size_t  framesToProcess)
protectedvirtual

◆ ref()

void WebCore::AudioNode::ref ( RefType  refType = RefTypeNormal)

◆ reset()

virtual void WebCore::AudioNode::reset ( )
pure virtual

◆ sampleRate()

virtual float WebCore::AudioNode::sampleRate ( ) const
inlinevirtual

◆ scriptExecutionContext()

ScriptExecutionContext* WebCore::AudioNode::scriptExecutionContext ( ) const
finalvirtual

Implements WebCore::EventTarget.

◆ setChannelCount()

virtual ExceptionOr<void> WebCore::AudioNode::setChannelCount ( unsigned  )
virtual

◆ setChannelCountMode()

ExceptionOr<void> WebCore::AudioNode::setChannelCountMode ( const String )

◆ setChannelInterpretation()

ExceptionOr<void> WebCore::AudioNode::setChannelInterpretation ( const String )

◆ setNodeType()

void WebCore::AudioNode::setNodeType ( NodeType  )

◆ silenceOutputs()

void WebCore::AudioNode::silenceOutputs ( )

◆ tailTime()

virtual double WebCore::AudioNode::tailTime ( ) const
pure virtual

◆ uninitialize()

virtual void WebCore::AudioNode::uninitialize ( )
virtual

◆ unsilenceOutputs()

void WebCore::AudioNode::unsilenceOutputs ( )

◆ updateChannelsForInputs()

void WebCore::AudioNode::updateChannelsForInputs ( )
protected

Member Data Documentation

◆ m_channelCount

unsigned WebCore::AudioNode::m_channelCount
protected

◆ m_channelCountMode

ChannelCountMode WebCore::AudioNode::m_channelCountMode
protected

◆ m_channelInterpretation

AudioBus::ChannelInterpretation WebCore::AudioNode::m_channelInterpretation
protected

The documentation for this class was generated from the following file: