Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <META NAME="Generator" CONTENT="Microsoft Word 97"> <TITLE>DirectMusic</TITLE> <META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot"> </HEAD> <BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftmargin="8"> <FONT FACE="Verdana"><H2><A NAME="MYSAMPLE">DirectMusic Software Synthesizer</A> </H2>
<H3>Summary</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
This sample contains working source code for a user-mode software synthesizer that plugs into the Microsoft® DirectMusic® architecture.<P>
<H3>Building a new DirectMusic Synthesizer</H3></FONT><FONT FACE="Verdana" SIZE=2><P> You are encouraged to use this sample code to start building your own software synthesizer. Modify the sample to add your own features.<P>
If you ship your synthesizer to customers, be sure to use the Guidgen program to create a Globally Unique ID (GUID) for your synthesizer so it won't interfere with other synthesizers. Set CLSID_DDKSynth at the top of Umsynth.h to be your GUID. You should also set the text in Ddksynth.cpp and Ddksynth.rc to describe your synthesizer.<P>
<H3>Creating a Kernel-mode Synthesizer or Driver</H3></FONT><FONT FACE="Verdana" SIZE=2><P> Although this sample doesn't show you how to create a kernel-mode synthesizer or driver, you can use this code to feel out how synthesis and DLS downloads work. We recommend that you try out your ideas and get things working in a user-mode synthesizer before moving to kernel mode or writing drivers. This approach is often easier and can save quite a bit of debugging time.<P>
<H3>Building the Sample</H3></FONT><FONT FACE="Verdana" SIZE=2><P> Open a free or checked DDK build environment, go to this directory, and run <B>build</B>. This creates Ddksynth.dll in the Objfre or Objchk directory. Before the sample can be used, it must be registered by running <B>regsvr32 ddksynth.dll</B>.<P>
<H3>Testing the Synthesizer</H3></FONT><FONT FACE="Verdana" SIZE=2><P> To test the synthesizer, open DirectMusic Producer and open the Port Configuration window. (You can do this by right-clicking the button showing a 1 or 2 with a sound wave behind it on the Transit Controls toolbar.) The port name dropdown will now contain the option <B>Microsoft DDK Synthesizer</B> in addition to the Microsoft Synthesizer option. Set one of the configurations to use the Microsoft DDK Synthesizer port.<P>
Then, when you play music through that configuration, it will be played by the synthesizer you built from the DDK sample. The sound and capabilities of the DDK sample (Microsoft DDK Synthesizer) are virtually identical to the default DirectMusic synthesizer (Microsoft Synthesizer), one major exception to this being that the DDK sample synthesizer does not support reverb.<P>
<H3>Supported Configurations</H3></FONT><FONT FACE="Verdana" SIZE=2><P> The DDK sample synthesizer has been tested in checked and free builds with Microsoft Visual C++® versions 5 and 6. It has not been tested on Alpha or other 64-bit platforms.<P>
No special Plug and Play or Power Management support is required for this type of synthesizer.<P>
<H3>CODE TOUR</H3> <H4>File Manifest</H4> </FONT><U><PRE>File		 Description </U> Instr.cpp	 Implements instruments Umsynth.cpp	 Implementation of CUserModeSynth Umsynth.h	 Prototype file for Umsynth.cpp Voice.cpp	 Implements voices Clist.cpp	 Implements a simple list data structure Clist.h 	 Prototype file for Clist.cpp Control.cpp	 Implementation of CControlLogic Csynth.cpp	 Implementation of CSynth Csynth.h	 Prototype file for Csynth.h Midi.cpp	 Implements MIDI events Mix.cpp	 Implements CDigitalAudio mixing functions Mmx.cpp	 Implements MMX-optimized mixing functions Plclock.cpp	 Implements clocks Plclock.h	 Prototype file for Plclock.cpp Ddksynth.cpp	 DLL entry points and IDirectMusicSynthFactory implementation Oledll.cpp	 Handle standard entry points for OLE server DLL Oledll.h	 Prototype file for Oledll.h Synth.h	 Prototype file for Instr.cpp, Midi.cpp, Voice.cpp, and Control.cpp Simple.h	 Includes some common header files Misc.h	 Prototypes of miscellaneous helper functions Validate.h	 Pointer validation macros Debug.cpp	 Debugging helper functions such as assertions and tracing Debug.h	 Prototype file for Debug.cpp Ddksynth.rc	 Resources file containung version information Guids.cpp	 GUID definitions Ddksynth.def	 DLL .def file Makefile	 Makefile for BUILD environment Sources	 Sources file for BUILD environment
</FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT> <TABLE CELLSPACING=0 BORDER=0 WIDTH=624> <TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2> <P></TD> </TR> </TABLE>
<FONT FACE="MS Sans Serif" SIZE=1><P>© 1999 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY> </HTML>
|