9#include <sndcore2/core.h>
10#include <sndcore2/voice.h>
11#include "../AudioDriver.h"
12#include "../../libgui/GuiSoundOggPlayer.h"
22 void start()
override;
26 int32_t
playVoice(
const uint8_t* data, int32_t length,
int volume)
override;
33 void playStream(
const uint8_t* data, int32_t length,
bool loop,
int volume)
override;
51 WutVoiceSlot voices[16];
54 AXVoice* streamVoiceL;
55 AXVoice* streamVoiceR;
58 static const uint32_t STREAM_BUFFER_SAMPLES = 16384;
59 alignas(32) int16_t streamBufL[STREAM_BUFFER_SAMPLES];
60 alignas(32) int16_t streamBufR[STREAM_BUFFER_SAMPLES];
63 bool eofSilenceWritten;
Platform audio backend GuiSound delegates to: fixed one-shot PCM voices plus one background OGG strea...
Platform-agnostic Tremor (integer OGG) decoder.
Wii U AudioDriver: AX (sndcore2), 16 fixed AXVoice slots for one-shots plus a dedicated stereo stream...
void pauseStream() override
Pauses the stream, keeping its position.
void init() override
Allocates the backend's audio resources. Does not start playback; see start().
void resumeVoice(int32_t voice) override
Resumes a voice paused with pauseVoice().
void stopVoice(int32_t voice) override
Stops a voice returned by playVoice() and frees its slot.
void resumeStream() override
Resumes a stream paused with pauseStream().
void shutdown() override
Releases everything init() allocated. Call stop() first.
void stopStream() override
Stops the stream started by playStream().
void start() override
Starts the audio backend running (eg. registers the DSP/AX callback).
void setVoiceVolume(int32_t voice, int volume) override
Changes the volume of a playing voice.
int32_t playVoice(const uint8_t *data, int32_t length, int volume) override
Start a one-shot/short PCM voice.
void stop() override
Stops the audio backend.
void setStreamVolume(int volume) override
Changes the stream volume.
bool isStreamPlaying() override
bool isVoicePlaying(int32_t voice) override
void handleStreamCallback()
AX frame callback hook that refills the stream ring buffers.
void pauseVoice(int32_t voice) override
Pauses a playing voice, keeping its position and slot.
void playStream(const uint8_t *data, int32_t length, bool loop, int volume) override
Streamed (OGG) playback.