Getting to Know Windows Waves


Digital sounds in Windows are known as waves , which refer to the physical sound waves from which digital sounds originate. Windows waves are stored in files with a .WAV file extension, and can be stored in a wide range of formats to accommodate different sound qualities. More specifically , you can save waves in frequencies from 8kHz to 44kHz with either 8 or 16 bits per sample and as either mono or stereo. Just as with any other sampled digital audio, the size of a wave file is directly proportional to the quality of the wave sound. So, higher quality waves take up more memory than lower quality waves.

You might be surprised to find out that waves are really just Windows resources like bitmaps, icons, and cursors . This means that you can specify waves as resources in the resource script for your games and compile them directly into the executable program files. The benefit is that you don't have to worry about distributing a bunch of extra files when you make your game available to the public; all the wave files are included in the game's executable program file.

If you want to experiment a little with Windows waves and how they work, you'll be glad to know that Windows includes a built-in tool for working with waves. It's called Sound Recorder, and you'll find it by following these steps in Windows XP:

  1. Click the Start button.

  2. Select All Programs, followed by Accessories, and then Entertainment.

  3. Select Sound Recorder to launch the program.

graphics/book.gif

If you aren't using Windows XP, don't worry because Sound Recorder is included with all versions of Windows. Just poke around within the Accessories folder, and you'll be able to find it.


The Sound Recorder program is shown in Figure 13.1.

Figure 13.1. The Sound Recorder program allows you to record sounds and then manipulate them to some degree.

graphics/13fig01.gif

You'll notice that the Sound Recorder tool includes a series of buttons that look like the buttons on a VCR. These buttons allow you to record new sounds using your computer's microphone or CD-ROM drive, as well as play, stop, rewind, and fast forward sounds. Feel free to try your hand at recording a sound with the microphone and playing it back with Sound Recorder. You might also want to experiment with some of the effects that can be applied to the sound, such as reversing it and hearing the sound backwards. Remember all of the rumors about hidden messages in rock music when you play it backwards ? Now you can create your own!

Although Sound Recorder is a fairly primitive tool in terms of features, it does give you capability to tinker with waves and even apply effects to them. Before you invest in a higher- powered sound tool, be sure to take some time to experiment with Sound Recorder. Later this hour in the section "Creating and Editing Sounds," you'll learn some interesting techniques used to create wave sound effects; you can certainly use Sound Recorder as the tool for creating these effects. If Sound Recorder ends up feeling too limited for you, you also learn about other sound tools in the later section "Exploring Sound Tools."



Sams Teach Yourself Game Programming in 24 Hours
Sams Teach Yourself Game Programming in 24 Hours
ISBN: 067232461X
EAN: 2147483647
Year: 2002
Pages: 271

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