Chapter 5: Sound Effects and Audio

Quiz Answers

  1. What do you use to reference a sound that has been included in an XACT audio file?

    • To play a sound in an XACT audio file, you reference the sound by its associated cue name.

  2. What are the pros and cons of using the simple sound API available in XNA 3.0 instead of using XACT?

    • Pros: simple and fast, and supported on the Zune. Cons: no design time modification of sound properties.

  3. Fact or fiction: the only way to get a soundtrack to loop during gameplay is to manually program the sound in code to play over and over.

    • Fiction. You can set the looping property of a particular sound in XACT by specifying a certain number of times for the sound to play or by specifying the sound to play in an infinite loop.

  4. Fact or fiction: you can adjust the volume of your sounds using XACT.

    • Fact. You can adjust the volume, pitch, and other properties of a sound file using XACT.

  5. How do you pause and restart a sound in XNA when using XACT audio files?

    • If you capture the Cue object from the GetCue method and play the sound from the Cue object, you can call Pause, Stop, Play, and other methods on the Cue object to manipulate playback of that particular sound.

  6. What, according to Michael Scott, did Abraham Lincoln once say which is a principle that Michael carries with him in the workplace?

    • In the TV show The Office, during the "Diversity Day" episode, Michael Scott creates a videotape about his new organization, Diversity Tomorrow. Michael Scott [on a videotape]: "Hi, I'm ...

Get Learning XNA 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.