Class WebAudioAdapter
Represents an adapter for the WebAudio domain to simplify the command interface.
public class WebAudioAdapter
- Inheritance
-
WebAudioAdapter
- Inherited Members
Constructors
WebAudioAdapter(IDevToolsSession)
Initializes a new instance of the WebAudioAdapter class.
public WebAudioAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
Disable(DisableCommandSettings?, CancellationToken, int?, bool)
Disables the WebAudio domain.
public Task<DisableCommandResponse?> Disable(DisableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandDisableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Enable(EnableCommandSettings?, CancellationToken, int?, bool)
Enables the WebAudio domain and starts sending context lifetime events.
public Task<EnableCommandResponse?> Enable(EnableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandEnableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetRealtimeData(GetRealtimeDataCommandSettings, CancellationToken, int?, bool)
Fetch the realtime data from the registered contexts.
public Task<GetRealtimeDataCommandResponse> GetRealtimeData(GetRealtimeDataCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetRealtimeDataCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
AudioListenerCreated
Notifies that the construction of an AudioListener has finished.
public event EventHandler<AudioListenerCreatedEventArgs>? AudioListenerCreated
Event Type
AudioListenerWillBeDestroyed
Notifies that a new AudioListener has been created.
public event EventHandler<AudioListenerWillBeDestroyedEventArgs>? AudioListenerWillBeDestroyed
Event Type
AudioNodeCreated
Notifies that a new AudioNode has been created.
public event EventHandler<AudioNodeCreatedEventArgs>? AudioNodeCreated
Event Type
AudioNodeWillBeDestroyed
Notifies that an existing AudioNode has been destroyed.
public event EventHandler<AudioNodeWillBeDestroyedEventArgs>? AudioNodeWillBeDestroyed
Event Type
AudioParamCreated
Notifies that a new AudioParam has been created.
public event EventHandler<AudioParamCreatedEventArgs>? AudioParamCreated
Event Type
AudioParamWillBeDestroyed
Notifies that an existing AudioParam has been destroyed.
public event EventHandler<AudioParamWillBeDestroyedEventArgs>? AudioParamWillBeDestroyed
Event Type
ContextChanged
Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
public event EventHandler<ContextChangedEventArgs>? ContextChanged
Event Type
ContextCreated
Notifies that a new BaseAudioContext has been created.
public event EventHandler<ContextCreatedEventArgs>? ContextCreated
Event Type
ContextWillBeDestroyed
Notifies that an existing BaseAudioContext will be destroyed.
public event EventHandler<ContextWillBeDestroyedEventArgs>? ContextWillBeDestroyed
Event Type
NodeParamConnected
Notifies that an AudioNode is connected to an AudioParam.
public event EventHandler<NodeParamConnectedEventArgs>? NodeParamConnected
Event Type
NodeParamDisconnected
Notifies that an AudioNode is disconnected to an AudioParam.
public event EventHandler<NodeParamDisconnectedEventArgs>? NodeParamDisconnected
Event Type
NodesConnected
Notifies that two AudioNodes are connected.
public event EventHandler<NodesConnectedEventArgs>? NodesConnected
Event Type
NodesDisconnected
Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
public event EventHandler<NodesDisconnectedEventArgs>? NodesDisconnected