Previous Next

IDirectMusicSynth

The IDirectMusicSynth interface is used by DirectMusic to communicate with user-mode synthesizers. If you create a software synthesizer, it should have an IDirectMusicSynth interface to plug into DirectMusic. IDirectMusicSynth inherits from the IUnknown interface.

The synthesizer is not complete without a connection to a wave sink, which is represented as an object with an IDirectMusicSynthSink interface. The wave sink connects the synthesizer to the audio stream out — for example, DirectSound®, DirectShow®, or waveform audio.

Most applications do not need to call the methods of the IDirectMusicSynth interface directly; the DirectMusic port typically manages the synthesizer. You can, however, talk directly to the synthesizer during development and testing.

Before the synthesizer can be activated, a wave sink must first be created and connected to the synth via a call to SetSynthSink. This should be the very first call after creating the synth because many of the timing-related calls, including GetLatencyClock and SetMasterClock, are actually passed through to equivalent calls on IDirectMusicSynthSink.

The default IDirectMusicSynthSink implementation, DirectMusicSynthSink, uses DirectSound.

In addition to the methods that IDirectMusicSynth inherits from the IUnknown interface, IDirectMusicSynth supports the methods shown in the following table, which organizes them into functional groups.

Group Method Names
Activation IDirectMusicSynth::Activate
Channels IDirectMusicSynth::GetChannelPriority

IDirectMusicSynth::SetChannelPriority

Instruments IDirectMusicSynth::Download

IDirectMusicSynth::Unload

Information IDirectMusicSynth::GetAppend

IDirectMusicSynth::GetFormat

IDirectMusicSynth::GetLatencyClock

IDirectMusicSynth::GetPortCaps

IDirectMusicSynth::GetRunningStats

Playback IDirectMusicSynth::PlayBuffer

IDirectMusicSynth::Render

Ports IDirectMusicSynth::Open

IDirectMusicSynth::Close

IDirectMusicSynth::SetNumChannelGroups

Miscellaneous parameters IDirectMusicSynth::SetMasterClock

IDirectMusicSynth::SetSynthSink


For more information, see the descriptions of the IDirectMusic and IDirectMusicPort interfaces in the Platform SDK documentation.

See Also

IDirectMusicSynthSink