Sound Pipe Demo

Location

$CAFE_ROOT/system/src/demo/ax

Description

Demonstrates how to load and play sound effect samples using the Sound Pipeline. Specifically, it shows how to:

The program arranges playback with a simple monophonic sequencer. You are encouraged to experiment with the sequence table.

Console Output

After the program is invoked, it will display the following output:

SPInitSoundTable: loaded samples @ 0x10ca7100, samples_size=15564746

Event at 0
Total CPU : 14%
User      : 0%
AX        : 14%
Voices    : 0
maxframe time : 3013
=======================

Event at 1020
Sample 1 requested.
Mix:DSP:src:0x00010000:Pans:64, 64, 0:Efx:3:Cmpr:0:
Total CPU : 17%
User      : 0%
AX        : 16%
Voices    : 1
maxframe time : 3010
=======================

Event at 2011
Total CPU : 16%
User      : 0%
AX        : 16%
Voices    : 1
maxframe time : 3014
=======================

Event at 3002
Sample 1 requested.
Mix:DSP:src:0x00010000:Pans:64, 64, 0:Efx:0:Cmpr:0:
Total CPU : 18%
User      : 0%
AX        : 18%
Voices    : 1
maxframe time : 3013
=======================

Event at 4022
Total CPU : 18%
User      : 0%
AX        : 18%
Voices    : 1
maxframe time : 3005
=======================

Events are reported every time the Sequencer starts an entry.

Profiles are reported once per second.

Files

$CAFE_ROOT/system/src/demo/ax/spdemo.c Demo source code.
$CAFE_ROOT/system/src/demo/ax/spdemo.h Sample ID defines.
$CAFE_ROOT/data/disc/content/axdemo/spdemo/spdemo.spt SoundPipe Table.
$CAFE_ROOT/data/disc/content/axdemo/spdemo/spdemo.spd SoundPipe Sample Data.

Samples

STRATCH Looped damped E2 string.
STRAT Looped open E2 string.
CHIMES Looped Chinese chimes.
FROGGIES Night-time Frog Chorus.
FOGHORN Puget Sound Ferry Foghorn.

See Also

AXAcquireVoice
AXSetVoiceState
SPGetSoundEntry
SPInitSoundTable
SPPrepareEnd
SPPrepareSound

Revision History

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


CONFIDENTIAL