QA


Q&A

Q1:

Is an MP3 song an example of a digital sound?

A1:

Yes, an MP3 song is very much like a wave file except that the MP3 audio format uses a technique known as compression to crunch the raw sound data into a smaller size. Audio compression is a complex topic that I'd rather steer clear of here, but the idea is that you analyze the data in a digital sound and figure out how to use less data to represent roughly the same sound. As a comparison, CD-quality sounds don't use any compression, which is why a song on a music CD takes up way more space than an MP3 song. If you listen closely, you might be able to notice a reduction in sound quality between a song on a CD and an MP3 song. On the other hand, the MP3 format makes sound files so much smaller that it's worth the reduction in quality in most cases.

Q2:

Can I record music as a wave file instead of using MIDI?

A2:

Absolutely. In fact, many commercial games use sampled music instead of MIDI music because it can be sampled directly from a music recording and will sound exactly like the original. A good example of a game that uses this approach is Tony Hawk's Pro Skater 4, which includes several sampled music tracks from popular music groups as background music for the game. Unfortunately, this approach won't work for the games you develop in this book because you're going to be limited in terms of how you can play waves. You learn more about why this is so in the next hour , but the limitation basically means that you can only play one wave sound at a time. So, if you play background music as a wave sound, you won't be able to add any sound effects.



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