tsp_switcher
Advanced sound player example that switches between
sounds based on control pad input.
Synopsis
tsp_switcher
Description
Loops one of three sound files off of disc. The user can select a
different sound to loop by pressing the A, B, or C buttons on the control
pad. The last button pressed corresponds to the sound being played.
This program demonstrates how one might use the advanced sound player as
an engine for doing environmentally-sensitive soundtrack playback. Note
that the sound being played doesn't change to the newly selected one until
the end of the current sound is reached. This demonstrates, for example
how a score might be made to change at the next musically sensible point.
See tsp_rooms for another way to do this.
Control pad operation:
- A-Select sound #1.
- B-Select sound #2.
- C-Select sound #3.
- X-Stop, quit when done playing.
- Shift-X-Quit immediately.
- Start-Toggle pause on/off.
Associated Files
tsp_switcher.c,
$samples
Location
examples/Audio/Advanced_Sound_Player
See Also
spCreatePlayer,
tsp_rooms,
tsp_algorithmic