共用方式為


AudioStreamDescriptor 類別

定義

表示音訊媒體串流的描述。

public ref class AudioStreamDescriptor sealed
public ref class AudioStreamDescriptor sealed : IMediaStreamDescriptor2
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.Core.IAudioStreamDescriptorFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AudioStreamDescriptor final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.Core.IAudioStreamDescriptorFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class AudioStreamDescriptor final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.Core.IAudioStreamDescriptorFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class AudioStreamDescriptor final : IMediaStreamDescriptor2
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.Core.IAudioStreamDescriptorFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AudioStreamDescriptor
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.Core.IAudioStreamDescriptorFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class AudioStreamDescriptor
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.Core.IAudioStreamDescriptorFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class AudioStreamDescriptor : IMediaStreamDescriptor2
function AudioStreamDescriptor(encodingProperties)
Public NotInheritable Class AudioStreamDescriptor
Public NotInheritable Class AudioStreamDescriptor
Implements IMediaStreamDescriptor2
繼承
Object Platform::Object IInspectable AudioStreamDescriptor
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

建立 MediaEncodingProfile時,請呼叫 SetAudioTracks,傳入一或多個 AudioStreamDescriptor 物件,以提供要編碼之曲目的相關資訊。

如需在 UWP 應用程式中使用媒體串流來源的範例,請參閱 MediaStreamSource 範例

版本歷程記錄

Windows 版本 SDK 版本 新增值
1607 14393 LeadingEncoderPadding
1607 14393 TrailingEncoderPadding
1709 16299 標籤
1803 17134 複製

建構函式

AudioStreamDescriptor(AudioEncodingProperties)

使用指定的AudioEncodingProperties建立AudioStreamDescriptor類別的實例。

屬性

EncodingProperties

取得物件,描述音訊資料流程的編碼屬性。 這些屬性包括音訊的取樣率和通道計數。

IsSelected

取得值,指出資料流程目前是否正由 MediaStreamSource使用。

Label

取得或設定應用程式定義的標籤,識別包含多個資料流程之 MediaEncodingProfile 中的音訊資料流程。

Language

取得或設定資料流程的 RFC-1766 語言代碼。

LeadingEncoderPadding

取得或設定編碼器在音訊資料流程開頭插入的樣本數目,做為填補。 使用這個屬性來明確設定系統將用來實作音訊資料流程無間距播放的填補大小。

Name

取得或設定資料流程的名稱。

TrailingEncoderPadding

取得或設定編碼器在音訊資料流程結尾插入的樣本數目,做為填補。 使用這個屬性來明確設定系統將用來實作音訊資料流程無間距播放的填補大小。

方法

Copy()

建立 AudioStreamDescriptor的複本。

適用於

另請參閱