Epok Engine

PSYQO SDK

psyqo::SPU::playADPCM

Method · 1 overload

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Method

Starts playing an ADPCM sample on the given channel.

Belongs to
psyqo::SPU
Header
spu.hh
Overloads
1

Declaration

static
Declaration
static void playADPCM(uint8_t channelId, uint32_t spuRamAddress, const ChannelPlaybackConfig& config, bool hardCut)

Starts playing an ADPCM sample on the given channel.

ParameterTypeMeaning
channelIduint8_tThe channel to play on, 0 to 23.
spuRamAddressuint32_tThe address of the sample in sound RAM. Must be 8 byte aligned and within `SOUND_RAM_SIZE`.
configconst ChannelPlaybackConfig &The volume, sample rate and ADSR settings to use.
hardCutboolWhether to key the channel off before keying it back on.

Returns: Nothing (void).

Example sketch

C++ example
#include "psyqo/spu.hh"

// Assume these named values have been initialized with valid data:
// uint8_t channelId
// uint32_t spuRamAddress
// const ChannelPlaybackConfig & config
// bool hardCut

psyqo::SPU::playADPCM(channelId, spuRamAddress, config, hardCut);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in https://github.com/epokengine/nugget/blob/4a01183295182b8e7702c908e1efaaa8f4538ffd/psyqo/spu.hh:138

Related members