共用方式為


MidiSynthesizer 類別

定義

代表包含在 Windows 中的 Microsoft GS 波浪式軟體合成器。 這個合成器提供 Roland GS 音效集,其中包含並擴充一般 MIDI 音效集。

public ref class MidiSynthesizer sealed : IClosable
/// [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 MidiSynthesizer final : IClosable
[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 MidiSynthesizer : System.IDisposable
Public NotInheritable Class MidiSynthesizer
Implements IDisposable
繼承
Object Platform::Object IInspectable MidiSynthesizer
屬性
實作

Windows 需求

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

屬性

AudioDevice

取得這個 Microsoft MIDI 合成器實例所使用的音訊輸出裝置。

DeviceId

取得 Microsoft MIDI 合成器的裝置識別碼。 請注意,合成器的所有實例都有相同的識別碼。

Volume

取得或設定 Microsoft MIDI 合成器這個實例的輸出磁片區。

方法

Close()

關閉這個 Microsoft MIDI 合成器的實例。 呼叫端最佳做法是使用這個方法來清除 MIDI 物件所使用的資源。

CreateAsync()

建立使用系統預設音訊輸出裝置之 Microsoft MIDI 合成器的新實例。

CreateAsync(DeviceInformation)

使用指定的音訊輸出裝置,建立 Microsoft MIDI 合成器的新實例。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

IsSynthesizer(DeviceInformation)

判斷特定裝置是否為 Microsoft MIDI 合成器的實例。 列舉系統上的所有 MIDI 輸出埠時,這個方法可用來識別其中哪一個是 Microsoft MIDI 合成器。

SendBuffer(IBuffer)

透過合成器的 輸出埠傳送位元組陣列。 這可讓您將資料當作位元組陣列傳送,而不是以定義的 MIDI 訊息傳送。

SendMessage(IMidiMessage)

透過 Microsoft MIDI 合成器的 輸出埠傳送 MIDI 訊息。

適用於

另請參閱