axsimple Demo

Location

$CAFE_ROOT/system/src/demo/ax

Description

Illustrates how to load, initialize, and play a sound effect. Specifically, this program illustrates how to perform the following.

Three sound effects are used and encoded into the ADPCM format using the dspadpcm.exe host PC tool.

The dspadpcm.exe tool can be found at the following location.

    $CAFE_ROOT/system/bin/win32

The demo runs continuously, cycling through the three samples, playing each sample for approximately 3 seconds.

Console Output

When run, the program will display the following output which includes a left trigger press which switches the AX system between modes.

Files loaded into:
axdemo/simple/strat.dsp: 0x10b83b40
axdemo/sound2/48k/acousticE.dsp: 0x10b872c0
axdemo/simple/Chimes.dsp: 0x10bb61c0


*******************************************************
*******************************************************
*    AXSimple - Plays canned DSPADPCM.dsp files       *
*                                                     *
*   L trigger   - switch AX mode between 32k and 48k  *
*   HOME button - quit program                        *
*******************************************************
*******************************************************
PlaySample started to play #0.
PlaySample started to play #1.  Time is now 3 seconds.  Renderer is PPC.  SrcRatio is 0.63.
PlaySample started to play #2.  Time is now 6 seconds.  Renderer is PPC.  SrcRatio is 1.00.
PlaySample started to play #3.  Time is now 9 seconds.  Renderer is PPC.  SrcRatio is 0.63.
PlaySample started to play #4.  Time is now 12 seconds.  Renderer is PPC.  SrcRatio is 0.63.
PlaySample started to play #5.  Time is now 15 seconds.  Renderer is PPC.  SrcRatio is 1.00.

Shutting down AX

Registering AX at 48K mode

AXInit Params:
   Renderer: 32K
   Pipeline: Single
Initializing AX on Core #0

PlaySample started to play #6.  Time is now 18 seconds.  Renderer is PPC.  SrcRatio is 0.94.
PlaySample started to play #7.  Time is now 21 seconds.  Renderer is PPC.  SrcRatio is 0.94.
PlaySample started to play #8.  Time is now 24 seconds.  Renderer is PPC.  SrcRatio is 1.50.
PlaySample started to play #9.  Time is now 27 seconds.  Renderer is PPC.  SrcRatio is 0.94.
PlaySample started to play #10.  Time is now 30 seconds.  Renderer is PPC.  SrcRatio is 0.94.
PlaySample started to play #11.  Time is now 33 seconds.  Renderer is PPC.  SrcRatio is 1.50.

After the banner, the PlaySample routine reports how many times it has been called, and the main loop reports the current elapsed time since the program was started.

Files

$CAFE_ROOT/system/src/demo/ax/axsimple.c Demo source code.
$CAFE_ROOT/data/disc/content/axdemo/simple/Chimes.dsp Looped Chinese chimes.
$CAFE_ROOT/data/disc/content/axdemo/simple/strat.dsp Looped open E2 string.
$CAFE_ROOT/data/disc/content/axdemo/sound2/48k/acousticE.dsp Non-looped acoustic E2 string.

See Also

AXAcquireVoice
AXSetVoiceState
dspadpcm.exe

Revision History

2013/11/13 32/48K AX switching
2013/05/08 Automated cleanup pass.
2012/01/26 Updated for SDK 2.02 Release


CONFIDENTIAL