Setting Up the Development Environment


First, select a development computer, the fastest and with the most disk space that you can afford. The samples in this book require a computer running Windows 98 or later; we recommend using a Windows 2000 or later operating system.

Since you ll be working with both audio and video, your computer should have a DirectX-compatible video card and a DirectSound-compatible sound card. Although most cards are compatible with these technologies, you should make sure. To get the best performance from the samples, you will also need a good- sized color monitor and stereo speakers . A sub-woofer is also preferable.

If you are going to be working with surround-sound code, you will need to install one of the new sound cards, with the appropriate number of speakers. Figure 1.1 shows the standard layout for 5.1 sound (five speakers and one sub-woofer).

click to expand
Figure 1.1: Standard speaker layout for 5.1 sound.

However, 6.1 sound is becoming popular, with the addition of one rear speaker, and Figure 1.2 shows the recommended layout.

click to expand
Figure 1.2: Standard speaker layout for 6.1 sound.

For larger rooms and theaters, two rear speakers are recommended, with the 7.1 layout shown in Figure 1.3.

click to expand
Figure 1.3: Standard speaker layout for 7.1 sound.

By the way, the following enumeration given for speaker configurations defines eighteen speakers “ so there is certainly room for even more expansion.

 #define SPEAKER_FRONT_LEFT             0x1  #define SPEAKER_FRONT_RIGHT            0x2  #define SPEAKER_FRONT_CENTER           0x4  #define SPEAKER_LOW_FREQUENCY          0x8  #define SPEAKER_BACK_LEFT              0x10  #define SPEAKER_BACK_RIGHT             0x20  #define SPEAKER_FRONT_LEFT_OF_CENTER   0x40  #define SPEAKER_FRONT_RIGHT_OF_CENTER  0x80  #define SPEAKER_BACK_CENTER            0x100  #define SPEAKER_SIDE_LEFT              0x200  #define SPEAKER_SIDE_RIGHT             0x400  #define SPEAKER_TOP_CENTER             0x800  #define SPEAKER_TOP_FRONT_LEFT         0x1000  #define SPEAKER_TOP_FRONT_CENTER       0x2000  #define SPEAKER_TOP_FRONT_RIGHT        0x4000  #define SPEAKER_TOP_BACK_LEFT          0x8000  #define SPEAKER_TOP_BACK_CENTER        0x10000  #define SPEAKER_TOP_BACK_RIGHT         0x20000  #define SPEAKER_RESERVED               0x80000000 

For debugging purposes, especially with video game applications, it is often better to debug remotely over a network. If you want to use this option, obviously you need to have network access. Only the computer running the debugging code needs to have all the multimedia hardware; the development computer is only used to inspect code using the debugging software. However, for the samples in this book that do not exclusively use full-screen video, debugging on the development computer is fine, and there should be little need for remote debugging.

For software, you will need to install Visual Studio .NET, unless you wish to convert the projects back into Visual Studio 6.0, which is still a very common and popular development environment. If you wish to use Visual Studio .NET, but prefer the user interface of Visual Studio 6.0, there is an option that converts the appearance of the UI windows to those of Visual Studio 6.0. This helps keep the view consistent, but a number of the options that you have at your disposal in Visual Studio 6.0 are buried much deeper in Visual Studio .NET, so some developers find the newer UI more awkward .

Although the Windows operating system includes the DirectX run-time bits, you will need to install the latest version of the DirectX SDK (at press time, this was version 9.0), including all the libraries, headers and documentation, by downloading it directly from the Microsoft Web site. The link to the latest download is: http://www.msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp .

If you cannot reach the DirectX SDK from the previous link, go to www.microsoft.com and use the search feature to locate the DirectX download. Make sure that you select the Debug run-time bits option “ this enables all sorts of debugging goodies that are not available in the retail version of DirectX. Note also that there is a DirectX entry in the Control Panel, so that you can ensure that hardware acceleration is selected (which it will be by default), and you can change other settings (though we recommend sticking with the defaults for now).

If you already have a DXSDK directory from installing an earlier version of DirectX, you should rename or delete it before installing the latest DirectX SDK, since the DirectX installer will write the new SDK files over the old. However, files that you created or built yourself will be preserved. While this is commendable in that the installer will not delete your work, it can create some confusion in the directory structure. We recommend archiving an older installation so that you know that all the files in the new DXSDK directory are recent.

For the same reason, if you have an earlier version of the DirectX SDK installed, it may be in the directory C:\MSSDK. If so, and if you are converting those older projects to the new version of DirectX, then make sure that the library and include paths in those projects point to the correct location in the DXSDK directory.

start sidebar
DirectX FAQ

A useful Web site that contains frequently asked questions (FAQ) about DirectX is:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndxgen/html/directx9devfaq.asp

end sidebar
 

When you have installed DirectX “ which usually means downloading an .exe file to your machine, and then running it to uncompress all the files “ it is helpful to examine the SDK directory structure and the sample programs.




Fundamentals of Audio and Video Programming for Games
Fundamentals of Audio and Video Programming for Games (Pro-Developer)
ISBN: 073561945X
EAN: 2147483647
Year: 2003
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net