Microsoft DirectX 9.0 SDK Update (Summer 2004) |
Building DirectMusic Projects
Projects need to include the Dmusici.h header file, which contains declarations for the DirectMusic performance layer. Including this file will bring in three other essential headers:
- Dmusicc.h: declarations for the core layer of DirectMusic.
- Dmerr.h: DirectMusic return values.
- Dsound.h: the DirectSound API.
The following additional headers are not needed by most applications:
- Dmusicf.h: file structures and definitions. This header is needed only by applications such as music-authoring tools that work directly with files and don't rely solely on the loaders built into DirectMusic.
- Dmusics.h: declarations for the IDirectMusicSynth and IDirectMusicSynthSink interfaces, which are used for creating synthesizers and synthesizer sinks.
- Dmusbuff.h: declaration of the DMUS_EVENTHEADER structure, used only by applications that are directly sequencing events to the synthesizer.
- Dmksctrl.h: declarations for the IKsControl interface used for port property sets. You do not need this file if you have included Ksproxy.h and Ks.h.
- Dmplugin.h: declarations for the IDirectMusicTool8 and IDirectMusicTrack8 interfaces, which are implemented by add-ons for advanced applications that need specialized message-processing tools and track types. Most applications do not use this part of the DirectMusic API.
You must also ensure that your application has access to the GUIDs used by DirectMusic. Define INITGUID before all other preprocessor directives, or link to Dxguid.lib.
DirectMusic uses the multithreading capabilities of the Windows 32-bit operating system. Multithreading allows DirectX to generate, process, and synthesize music in the background while your application is accomplishing other tasks. You should develop your project with multithreading in mind. If nothing else, be sure to link with the appropriate libraries.
© 2004 Microsoft Corporation. All rights reserved.