Skip to content

Update audio-graphs.md #4664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion uwp/audio-video-camera/audio-graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ A file input node allows you to feed data from an audio file into the graph. Cre

## MediaSource input node

The [**MediaSource**](/uwp/api/Windows.Media.Core.MediaSource) class provides a common way to reference media from different sources and exposes a common model for accessing media data regardless of the underlying media format which could be a file on disk, a stream, or an adaptive streaming network source. A [**MediaSourceAudioInputNode](/uwp/api/windows.media.audio.mediasourceaudioinputnode) node lets you direct audio data from a **MediaSource** into the audio graph. Create a **MediaSourceAudioInputNode** by calling [**CreateMediaSourceAudioInputNodeAsync**](/uwp/api/windows.media.audio.audiograph.createmediasourceaudioinputnodeasync#Windows_Media_Audio_AudioGraph_CreateMediaSourceAudioInputNodeAsync_Windows_Media_Core_MediaSource_), passing in a **MediaSource** object representing the content you wish to play. A [**CreateMediaSourceAudioInputNodeResult](/uwp/api/windows.media.audio.createmediasourceaudioinputnoderesult) is returned which you can use to determine the status of the operation by checking the [**Status**](/uwp/api/windows.media.audio.createmediasourceaudioinputnoderesult.status) property. If the status is **Success**, you can get the created **MediaSourceAudioInputNode** by accessing the [**Node**](/uwp/api/windows.media.audio.createmediasourceaudioinputnoderesult.node) property. The following example shows the creation of a node from an AdaptiveMediaSource object representing content streaming over the network. For more inforation on working with **MediaSource**, see [Media items, playlists, and tracks](media-playback-with-mediasource.md). For more information on streaming media content over the internet, see [Adaptive streaming](adaptive-streaming.md).
The [**MediaSource**](/uwp/api/Windows.Media.Core.MediaSource) class provides a common way to reference media from different sources and exposes a common model for accessing media data regardless of the underlying media format which could be a file on disk, a stream, or an adaptive streaming network source. A [**MediaSourceAudioInputNode](/uwp/api/windows.media.audio.mediasourceaudioinputnode) node lets you direct audio data from a **MediaSource** into the audio graph. Create a **MediaSourceAudioInputNode** by calling [**CreateMediaSourceAudioInputNodeAsync**](/uwp/api/windows.media.audio.audiograph.createmediasourceaudioinputnodeasync#Windows_Media_Audio_AudioGraph_CreateMediaSourceAudioInputNodeAsync_Windows_Media_Core_MediaSource_), passing in a **MediaSource** object representing the content you wish to play. A [**CreateMediaSourceAudioInputNodeResult](/uwp/api/windows.media.audio.createmediasourceaudioinputnoderesult) is returned which you can use to determine the status of the operation by checking the [**Status**](/uwp/api/windows.media.audio.createmediasourceaudioinputnoderesult.status) property. If the status is **Success**, you can get the created **MediaSourceAudioInputNode** by accessing the [**Node**](/uwp/api/windows.media.audio.createmediasourceaudioinputnoderesult.node) property. The following example shows the creation of a node from an AdaptiveMediaSource object representing content streaming over the network. For more information on working with **MediaSource**, see [Media items, playlists, and tracks](media-playback-with-mediasource.md). For more information on streaming media content over the internet, see [Adaptive streaming](adaptive-streaming.md).

:::code language="csharp" source="~/../snippets-windows/windows-uwp/audio-video-camera/AudioGraph/cs/MainPage.xaml.cs" id="SnippetDeclareMediaSourceInputNode":::

Expand Down