AudioFrameInputNode
AudioFrameInputNode
AudioFrameInputNode
AudioFrameInputNode
Class
Definition
Represents an audio frame input node.
public : sealed class AudioFrameInputNode : IClosable, IAudioFrameInputNode, IAudioInputNode, IAudioInputNode2, IAudioNodepublic sealed class AudioFrameInputNode : IDisposable, IAudioFrameInputNode, IAudioInputNode, IAudioInputNode2, IAudioNodePublic NotInheritable Class AudioFrameInputNode Implements IDisposable, IAudioFrameInputNode, IAudioInputNode, IAudioInputNode2, IAudioNode// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
Get an instance of this class by calling CreateFrameInputNode.
Properties
ConsumeInput ConsumeInput ConsumeInput ConsumeInput
Gets or sets a value indicating if the audio frame input node consumes input.
public : PlatForm::Boolean ConsumeInput { get; set; }public bool ConsumeInput { get; set; }Public ReadWrite Property ConsumeInput As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the audio frame input node consumes input, and false otherwise.
EffectDefinitions EffectDefinitions EffectDefinitions EffectDefinitions
Gets the list of effect definitions for the audio frame input node.
public : IVector<IAudioEffectDefinition> EffectDefinitions { get; }public IList<IAudioEffectDefinition> EffectDefinitions { get; }Public ReadOnly Property EffectDefinitions As IList<IAudioEffectDefinition>// You can use this property in JavaScript.
- Value
- IVector<IAudioEffectDefinition> IList<IAudioEffectDefinition> IList<IAudioEffectDefinition> IList<IAudioEffectDefinition>
The list of effect definitions for the node.
- See Also
Emitter Emitter Emitter Emitter
Gets the AudioNodeEmitter that describes the position and other physical characteristics of the emitter from which the AudioFrameInputNode audio is emitted when spatial audio processing is used.
public : AudioNodeEmitter Emitter { get; }public AudioNodeEmitter Emitter { get; }Public ReadOnly Property Emitter As AudioNodeEmitter// You can use this property in JavaScript.
The spatial audio emitter associated with the AudioFrameInputNode.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Remarks
Create an AudioFrameInputNode with an AudioNodeEmitter by calling the overload of CreateFrameInputNode that accepts an emitter as an argument.
EncodingProperties EncodingProperties EncodingProperties EncodingProperties
Gets the encoding properties for the audio frame input node.
public : AudioEncodingProperties EncodingProperties { get; }public AudioEncodingProperties EncodingProperties { get; }Public ReadOnly Property EncodingProperties As AudioEncodingProperties// You can use this property in JavaScript.
- Value
- AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties
The encoding properties for the node.
OutgoingConnections OutgoingConnections OutgoingConnections OutgoingConnections
Gets the list of outgoing connections from the audio frame input node to other nodes in the audio graph.
public : IVectorView<AudioGraphConnection> OutgoingConnections { get; }public IReadOnlyList<AudioGraphConnection> OutgoingConnections { get; }Public ReadOnly Property OutgoingConnections As IReadOnlyList<AudioGraphConnection>// You can use this property in JavaScript.
- Value
- IVectorView<AudioGraphConnection> IReadOnlyList<AudioGraphConnection> IReadOnlyList<AudioGraphConnection> IReadOnlyList<AudioGraphConnection>
A collection of AudioGraphConnection objects representing the supported connections.
OutgoingGain OutgoingGain OutgoingGain OutgoingGain
Gets or sets the outgoing gain for the audio frame input node.
public : double OutgoingGain { get; set; }public double OutgoingGain { get; set; }Public ReadWrite Property OutgoingGain As double// You can use this property in JavaScript.
- Value
- double double double double
The outgoing gain value.
PlaybackSpeedFactor PlaybackSpeedFactor PlaybackSpeedFactor PlaybackSpeedFactor
Gets or sets the playback speed factor for the audio frame input node.
public : double PlaybackSpeedFactor { get; set; }public double PlaybackSpeedFactor { get; set; }Public ReadWrite Property PlaybackSpeedFactor As double// You can use this property in JavaScript.
- Value
- double double double double
A value indicating the playback speed factor.
QueuedSampleCount QueuedSampleCount QueuedSampleCount QueuedSampleCount
Gets the queued sample count for the audio frame input node.
public : ulong QueuedSampleCount { get; }public ulong QueuedSampleCount { get; }Public ReadOnly Property QueuedSampleCount As ulong// You can use this property in JavaScript.
- Value
- ulong ulong ulong ulong
A value indicating the queued sample count.
Methods
AddFrame(AudioFrame) AddFrame(AudioFrame) AddFrame(AudioFrame) AddFrame(AudioFrame)
Adds an audio frame to the audio frame input node.
public : void AddFrame(AudioFrame frame)public void AddFrame(AudioFrame frame)Public Function AddFrame(frame As AudioFrame) As void// You can use this method in JavaScript.
An AudioFrame object representing the frame.
Remarks
The provided AudioFrame object must have an underlying AudioBuffer with a Length greater than 0 or an E_INVALIDARG error will result. Also, the underlying IMemoryBuffer containing the raw audio data must be block-aligned based on the bit depth per sample and number of channels. This means that the size of the buffer, in bytes, must be an integral multiple of (BitsPerSample / 8) * ChannelCount of the EncodingProperties property for the node. Attempting to add a frame with a non-aligned audio buffer will result in an E_INVALIDARG error.
A maximum of 64 frames can be queued in the AudioFrameInputNode at one time. Attempting to queue more than 64 frames will result in an error.
AddOutgoingConnection(IAudioNode) AddOutgoingConnection(IAudioNode) AddOutgoingConnection(IAudioNode) AddOutgoingConnection(IAudioNode)
Adds an outgoing connection to the audio frame input node.
public : void AddOutgoingConnection(IAudioNode destination)public void AddOutgoingConnection(IAudioNode destination)Public Function AddOutgoingConnection(destination As IAudioNode) As void// You can use this method in JavaScript.
- destination
- IAudioNode IAudioNode IAudioNode IAudioNode
The destination node for the connection.
- See Also
AddOutgoingConnection(IAudioNode, Double) AddOutgoingConnection(IAudioNode, Double) AddOutgoingConnection(IAudioNode, Double) AddOutgoingConnection(IAudioNode, Double)
Adds an outgoing connection with gain to the audio frame input node.
public : void AddOutgoingConnection(IAudioNode destination, double gain)public void AddOutgoingConnection(IAudioNode destination, Double gain)Public Function AddOutgoingConnection(destination As IAudioNode, gain As Double) As void// You can use this method in JavaScript.
- destination
- IAudioNode IAudioNode IAudioNode IAudioNode
The destination node for the connection.
- gain
- double Double Double Double
A value indicating the gain associated with the connection.
- See Also
Close() Close() Close() Close()
Closes the audio frame input node.
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
DisableEffectsByDefinition(IAudioEffectDefinition) DisableEffectsByDefinition(IAudioEffectDefinition) DisableEffectsByDefinition(IAudioEffectDefinition) DisableEffectsByDefinition(IAudioEffectDefinition)
Disables all effects in the EffectDefinitions list with the specified effect definition.
public : void DisableEffectsByDefinition(IAudioEffectDefinition definition)public void DisableEffectsByDefinition(IAudioEffectDefinition definition)Public Function DisableEffectsByDefinition(definition As IAudioEffectDefinition) As void// You can use this method in JavaScript.
- definition
- IAudioEffectDefinition IAudioEffectDefinition IAudioEffectDefinition IAudioEffectDefinition
The effect definition of the effects to disable.
DiscardQueuedFrames() DiscardQueuedFrames() DiscardQueuedFrames() DiscardQueuedFrames()
Removes queued frames from the audio frame input node.
public : void DiscardQueuedFrames()public void DiscardQueuedFrames()Public Function DiscardQueuedFrames() As void// You can use this method in JavaScript.
Dispose() Dispose() Dispose() Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()
EnableEffectsByDefinition(IAudioEffectDefinition) EnableEffectsByDefinition(IAudioEffectDefinition) EnableEffectsByDefinition(IAudioEffectDefinition) EnableEffectsByDefinition(IAudioEffectDefinition)
Enables all effects in the EffectDefinitions list with the specified effect definition.
public : void EnableEffectsByDefinition(IAudioEffectDefinition definition)public void EnableEffectsByDefinition(IAudioEffectDefinition definition)Public Function EnableEffectsByDefinition(definition As IAudioEffectDefinition) As void// You can use this method in JavaScript.
- definition
- IAudioEffectDefinition IAudioEffectDefinition IAudioEffectDefinition IAudioEffectDefinition
The effect definition of the effects to enable.
RemoveOutgoingConnection(IAudioNode) RemoveOutgoingConnection(IAudioNode) RemoveOutgoingConnection(IAudioNode) RemoveOutgoingConnection(IAudioNode)
Removes an outgoing connection from the audio frame input node.
public : void RemoveOutgoingConnection(IAudioNode destination)public void RemoveOutgoingConnection(IAudioNode destination)Public Function RemoveOutgoingConnection(destination As IAudioNode) As void// You can use this method in JavaScript.
- destination
- IAudioNode IAudioNode IAudioNode IAudioNode
The destination for the outgoing connection.
Reset() Reset() Reset() Reset()
Resets the audio frame input node.
public : void Reset()public void Reset()Public Function Reset() As void// You can use this method in JavaScript.
Remarks
Calling this method will discard all queued frames and will cause DiscardQueuedFrames to be called on any audio effects applied to the AudioFrameInputNode.
Start() Start() Start() Start()
Starts the audio frame input node.
public : void Start()public void Start()Public Function Start() As void// You can use this method in JavaScript.
Remarks
Audio graph nodes are created in the started state by default and will start processing audio when AudioGraph.Start is called. This method will restart processing for a node that was stopped with a call to Stop.
Stop() Stop() Stop() Stop()
Stops the audio frame input node.
public : void Stop()public void Stop()Public Function Stop() As void// You can use this method in JavaScript.
Remarks
To stop all processing for all nodes of the graph, call AudioGraph.Stop.
Events
AudioFrameCompleted AudioFrameCompleted AudioFrameCompleted AudioFrameCompleted
Notifies of a completed audio frame that has been submitted to the graph with a call to AddFrame.
public : event TypedEventHandler AudioFrameCompleted<AudioFrameInputNode, AudioFrameCompletedEventArgs>public event TypedEventHandler AudioFrameCompleted<AudioFrameInputNode, AudioFrameCompletedEventArgs>Public Event AudioFrameCompleted<AudioFrameInputNode, AudioFrameCompletedEventArgs>// You can use this event in JavaScript.
QuantumStarted QuantumStarted QuantumStarted QuantumStarted
Raised when the audio graph is ready to begin processing a new quantum of data.
public : event TypedEventHandler QuantumStarted<AudioFrameInputNode, FrameInputNodeQuantumStartedEventArgs>public event TypedEventHandler QuantumStarted<AudioFrameInputNode, FrameInputNodeQuantumStartedEventArgs>Public Event QuantumStarted<AudioFrameInputNode, FrameInputNodeQuantumStartedEventArgs>// You can use this event in JavaScript.
Remarks
Use the FrameInputNodeQuantumStartedEventArgs.RequiredSamples property to determine how many samples are required to fill the quantum with data. Pass an AudioFrame into the AddFrame method to provide the required audio samples.