playsample
Plays an AIFF sample in memory using the control
pad.
Synopsis
playsample [<sample file> [<rate>]]
Description
This program shows how to load an AIFF sample file and play it using the
control pad. Use the A button to start the sample, the B button to release
the sample, and the C button to stop the sample. The X button quits the
program.
Arguments
- sample file
- Name of a compatible AIFF sample file. Defaults to sinewave.aiff.
- rate
- Proportion of 44,100 Hz for the sample rate expressed as a 1.15
fraction. Unity is 32768, which is the default. Examples: 16384 for 22,050
Hz, 65535 for nearly 88,200 Hz.
Associated Files
playsample.c
Location
examples/Audio