axsimple6ch Demo

Location

$CAFE_ROOT/system/src/demo/ax

Description

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

Six sine tones 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 six samples, playing each sample for approximately 2 seconds. Each sine tone is set to come out of each of the six channels in a 5.1 system.

Console Output

When run, the program will display the following output:

    Samples loaded are:
    Sample 0: axdemo/simple/sine_440.dsp
    Sample 1: axdemo/simple/sine_520.dsp
    Sample 2: axdemo/simple/sine_600.dsp
    Sample 3: axdemo/simple/sine_600.dsp
    Sample 4: axdemo/simple/sine_800.dsp
    Sample 5: axdemo/simple/sine_80.dsp
    
    ***********************************************************
    ***********************************************************
    *      AXSimple6ch - Plays canned DSPADPCM.dsp files      *
    *  Plays sine tones through each channel, one at a time   *
    ***********************************************************
    ***********************************************************
    Playing sample 0 ; Time is now 2 seconds
    Playing sample 1 ; Time is now 4 seconds
    Playing sample 2 ; Time is now 6 seconds
    Playing sample 3 ; Time is now 8 seconds
    Playing sample 4 ; Time is now 10 seconds
    Playing sample 5 ; Time is now 12 seconds
    Playing sample 0 ; Time is now 14 seconds
    Playing sample 1 ; Time is now 16 seconds
    Playing sample 2 ; Time is now 18 seconds
    Playing sample 3 ; Time is now 20 seconds

After the banner, the PlaySample routine reports the sample it is playing, and the main loop reports the current elapsed time since the program was started.

Files

$CAFE_ROOT/system/src/demo/ax/axsimple6ch.c Demo source code.
$CAFE_ROOT/data/disc/content/axdemo/simple/sine_440.dsp Sine Wave at 440Hz.
$CAFE_ROOT/data/disc/content/axdemo/simple/sine_520.dsp Sine Wave at 520Hz.
$CAFE_ROOT/data/disc/content/axdemo/simple/sine_600.dsp Sine Wave at 600Hz.
$CAFE_ROOT/data/disc/content/axdemo/simple/sine_800.dsp Sine Wave at 800Hz.
$CAFE_ROOT/data/disc/content/axdemo/simple/sine_80.dsp Sine Wave at 80Hz.

See Also

AXAcquireVoice
AXSetVoiceState
dspadpcm.exe

Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup Pass.
2012/01/26 Updated for SDK 2.02 Release


CONFIDENTIAL