GC/Wii AudioDriver: AESND-based fixed voices for one-shots, wraps a GuiSoundOggPlayer for the background stream. More...
#include <OgcAudioDriver.h>
Public Member Functions | |
| void | init () override |
| Allocates the backend's audio resources. Does not start playback; see start(). | |
| void | shutdown () override |
| Releases everything init() allocated. Call stop() first. | |
| void | start () override |
| Starts the audio backend running (eg. registers the DSP/AX callback). | |
| void | stop () override |
| Stops the audio backend. | |
| int32_t | playVoice (const uint8_t *data, int32_t length, int volume) override |
| Start a one-shot/short PCM voice. | |
| void | stopVoice (int32_t voice) override |
| Stops a voice returned by playVoice() and frees its slot. | |
| void | pauseVoice (int32_t voice) override |
| Pauses a playing voice, keeping its position and slot. | |
| void | resumeVoice (int32_t voice) override |
| Resumes a voice paused with pauseVoice(). | |
| bool | isVoicePlaying (int32_t voice) override |
| void | setVoiceVolume (int32_t voice, int volume) override |
| Changes the volume of a playing voice. | |
| void | playStream (const uint8_t *data, int32_t length, bool loop, int volume) override |
| Streamed (OGG) playback. | |
| void | stopStream () override |
| Stops the stream started by playStream(). | |
| void | pauseStream () override |
| Pauses the stream, keeping its position. | |
| void | resumeStream () override |
| Resumes a stream paused with pauseStream(). | |
| bool | isStreamPlaying () override |
| void | setStreamVolume (int volume) override |
| Changes the stream volume. | |
| void | handleStreamCallback (int voice) |
| AESND callback hook, called from interrupt context to refill the stream voice. | |
GC/Wii AudioDriver: AESND-based fixed voices for one-shots, wraps a GuiSoundOggPlayer for the background stream.
Definition at line 15 of file OgcAudioDriver.h.
| void OgcAudioDriver::handleStreamCallback | ( | int | voice | ) |
AESND callback hook, called from interrupt context to refill the stream voice.
Not part of the AudioDriver interface.
Definition at line 19 of file OgcAudioDriver.cpp.
|
overridevirtual |
Allocates the backend's audio resources. Does not start playback; see start().
Implements AudioDriver.
Definition at line 33 of file OgcAudioDriver.cpp.
|
overridevirtual |
Implements AudioDriver.
Definition at line 126 of file OgcAudioDriver.cpp.
|
overridevirtual |
Implements AudioDriver.
Definition at line 82 of file OgcAudioDriver.cpp.
|
overridevirtual |
Pauses the stream, keeping its position.
Implements AudioDriver.
Definition at line 116 of file OgcAudioDriver.cpp.
|
overridevirtual |
Pauses a playing voice, keeping its position and slot.
Implements AudioDriver.
Definition at line 75 of file OgcAudioDriver.cpp.
|
overridevirtual |
Streamed (OGG) playback.
There is no per-call stream handle, only one can play at a time.
Implements AudioDriver.
Definition at line 90 of file OgcAudioDriver.cpp.
|
overridevirtual |
Start a one-shot/short PCM voice.
Returns a backend-defined voice handle (>=0) on success, or a negative value if no voice was available.
Implements AudioDriver.
Definition at line 65 of file OgcAudioDriver.cpp.
|
overridevirtual |
Resumes a stream paused with pauseStream().
Implements AudioDriver.
Definition at line 121 of file OgcAudioDriver.cpp.
|
overridevirtual |
Resumes a voice paused with pauseVoice().
Implements AudioDriver.
Definition at line 78 of file OgcAudioDriver.cpp.
|
overridevirtual |
Changes the stream volume.
| volume | Volume, 0-100 |
Implements AudioDriver.
Definition at line 130 of file OgcAudioDriver.cpp.
|
overridevirtual |
Changes the volume of a playing voice.
| voice | Voice handle returned by playVoice() |
| volume | Volume, 0-100 |
Implements AudioDriver.
Definition at line 86 of file OgcAudioDriver.cpp.
|
overridevirtual |
Releases everything init() allocated. Call stop() first.
Implements AudioDriver.
Definition at line 53 of file OgcAudioDriver.cpp.
|
overridevirtual |
Starts the audio backend running (eg. registers the DSP/AX callback).
Implements AudioDriver.
Definition at line 39 of file OgcAudioDriver.cpp.
|
overridevirtual |
|
overridevirtual |
Stops the stream started by playStream().
Implements AudioDriver.
Definition at line 111 of file OgcAudioDriver.cpp.
|
overridevirtual |
Stops a voice returned by playVoice() and frees its slot.
Implements AudioDriver.
Definition at line 72 of file OgcAudioDriver.cpp.