Dela via


MediaSourceAudioInputNode Class

Definition

Represents a node in an audio graph that inputs audio data into the graph from a MediaSource object.

public ref class MediaSourceAudioInputNode sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaSourceAudioInputNode final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaSourceAudioInputNode : System.IDisposable
Public NotInheritable Class MediaSourceAudioInputNode
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MediaSourceAudioInputNode
Attributes
Implements

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Remarks

The MediaSource class provides a common representation of media content from different kinds of sources, such as files or network streams. For more information on working with MediaSource, see Media items, playlists, and tracks.

Get an instance of this class by calling AudioGraph.CreateMediaSourceAudioInputNode and then accessing the CreateFileInputNodeResult.FileInputNode property.

Properties

ConsumeInput

Gets or sets a value indicating if the MediaSource input node consumes input.

Duration

Gets the duration for the media content represented by the MediaSource associated with the node.

EffectDefinitions

Gets the list of effect definitions for the MediaSource node. The effects in the list process audio data that flows through the node in the order in which they appear in the list.

Emitter

Gets the AudioNodeEmitter that describes the position and other physical characteristics of the emitter from which the AudioSubmixNode output audio is emitted when spatial audio processing is used.

EncodingProperties

Gets the encoding properties for the audio device submix node.

EndTime

Gets or sets the end time for the MediaSource input node, which determines when playback of the media content ends.

LoopCount

Gets or sets the loop count of the MediaSource input node.

MediaSource

Gets the MediaSource associated with the audio input node.

OutgoingConnections

Gets the list of outgoing connections from the MediaSource input node to other nodes in the audio graph.

OutgoingGain

Gets or sets the outgoing gain for the MediaSource audio input node.

PlaybackSpeedFactor

Gets or sets the playback speed factor for the MediaSource audio input node.

Position

Gets the playback position of the MediaSource input node.

StartTime

Gets or sets the start time for the MediaSource input node.

Methods

AddOutgoingConnection(IAudioNode, Double)

Adds an outgoing connection with gain to the MediaSource input node.

AddOutgoingConnection(IAudioNode)

Adds an outgoing connection with gain to the MediaSource input node.

Close()

Closes the MediaSource input node and disposes of associated resources.

DisableEffectsByDefinition(IAudioEffectDefinition)

Disables all effects in the EffectDefinitions list with the specified effect definition.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EnableEffectsByDefinition(IAudioEffectDefinition)

Enables all effects in the EffectDefinitions list with the specified effect definition.

RemoveOutgoingConnection(IAudioNode)

Removes the outgoing connection from the MediaSource audio input node to the specified node.

Reset()

Resets the MediaSource audio input node.

Seek(TimeSpan)

Moves the playback position of the node to the specified time within the media content.

Start()

Starts the MediaSource input node.

Stop()

Stops the audio file output node.

Events

MediaSourceCompleted

Occurs when the playback position reaches the end of the media content or the position specified with the EndTime property.

Applies to