Dela via


AudioGraph.QuantumStarted Event

Definition

Notifies that the audio graph has started processing a new quantum.

// Register
event_token QuantumStarted(TypedEventHandler<AudioGraph, IInspectable const&> const& handler) const;

// Revoke with event_token
void QuantumStarted(event_token const* cookie) const;

// Revoke with event_revoker
AudioGraph::QuantumStarted_revoker QuantumStarted(auto_revoke_t, TypedEventHandler<AudioGraph, IInspectable const&> const& handler) const;
public event TypedEventHandler<AudioGraph,object> QuantumStarted;
function onQuantumStarted(eventArgs) { /* Your code */ }
audioGraph.addEventListener("quantumstarted", onQuantumStarted);
audioGraph.removeEventListener("quantumstarted", onQuantumStarted);
- or -
audioGraph.onquantumstarted = onQuantumStarted;
Public Custom Event QuantumStarted As TypedEventHandler(Of AudioGraph, Object) 

Event Type

Windows requirements

App capabilities
backgroundMediaRecording

Remarks

The QuantumStarted event is synchronous, which means that you can't update the properties or state of the AudioGraph or the individual audio nodes in the handler for this event. Attempting perform an operation such as stopping the audio graph or adding, removing, or starting an individual audio node will result in an exception being thrown. You can change the state of the graph and its nodes from within the asynchronous QuantumProcessed event handler.

Because this event is synchronous and fires regularly on the processing cadence of the audio graph, the event handler can be used for synchronized processing of audio data, such as that obtained from the AudioFrameOutputNode.GetFrame method.

Applies to