Trade-offs and warnings
Consult the linked header for this operation’s ownership, lifetime and failure behavior.
PSYQO SDK
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.
Starts playing an ADPCM sample on the given channel.
static void playADPCM(uint8_t channelId, uint32_t spuRamAddress, const ChannelPlaybackConfig& config, bool hardCut)Starts playing an ADPCM sample on the given channel.
| Parameter | Type | Meaning |
|---|---|---|
channelId | uint8_t | The channel to play on, 0 to 23. |
spuRamAddress | uint32_t | The address of the sample in sound RAM. Must be 8 byte aligned and within `SOUND_RAM_SIZE`. |
config | const ChannelPlaybackConfig & | The volume, sample rate and ADSR settings to use. |
hardCut | bool | Whether to key the channel off before keying it back on. |
Returns: Nothing (void).
#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);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
dmaWriteSynchronously uploads data to the SPU's sound RAM.MethodgetNextFreeChannelReturns next free channel as part of SPU RAM, voices, ADSR and sound transfer.MethodinitAsyncEnables asynchronous DMA transfers for this SPU object.MethodinitializeResets the SPU to a known, silent state.MethodsilenceChannelsSilences the given channels.Method