Platform audio backend GuiSound delegates to: fixed one-shot PCM voices plus one background OGG stream. More...
#include <AudioDriver.h>
Public Member Functions | |
| virtual void | init ()=0 |
| Allocates the backend's audio resources. Does not start playback; see start(). | |
| virtual void | shutdown ()=0 |
| Releases everything init() allocated. Call stop() first. | |
| virtual void | start ()=0 |
| Starts the audio backend running (eg. registers the DSP/AX callback). | |
| virtual void | stop ()=0 |
| Stops the audio backend. | |
| virtual int32_t | playVoice (const uint8_t *data, int32_t length, int volume)=0 |
| Start a one-shot/short PCM voice. | |
| virtual void | stopVoice (int32_t voice)=0 |
| Stops a voice returned by playVoice() and frees its slot. | |
| virtual void | pauseVoice (int32_t voice)=0 |
| Pauses a playing voice, keeping its position and slot. | |
| virtual void | resumeVoice (int32_t voice)=0 |
| Resumes a voice paused with pauseVoice(). | |
| virtual bool | isVoicePlaying (int32_t voice)=0 |
| virtual void | setVoiceVolume (int32_t voice, int volume)=0 |
| Changes the volume of a playing voice. | |
| virtual void | playStream (const uint8_t *data, int32_t length, bool loop, int volume)=0 |
| Streamed (OGG) playback. | |
| virtual void | stopStream ()=0 |
| Stops the stream started by playStream(). | |
| virtual void | pauseStream ()=0 |
| Pauses the stream, keeping its position. | |
| virtual void | resumeStream ()=0 |
| Resumes a stream paused with pauseStream(). | |
| virtual bool | isStreamPlaying ()=0 |
| virtual void | setStreamVolume (int volume)=0 |
| Changes the stream volume. | |
Platform audio backend GuiSound delegates to: fixed one-shot PCM voices plus one background OGG stream.
Exactly one driver implements this and assigns the single global Platform instance.
Definition at line 17 of file AudioDriver.h.
|
pure virtual |
Allocates the backend's audio resources. Does not start playback; see start().
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Pauses the stream, keeping its position.
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Pauses a playing voice, keeping its position and slot.
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Streamed (OGG) playback.
There is no per-call stream handle, only one can play at a time.
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
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.
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Resumes a stream paused with pauseStream().
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Resumes a voice paused with pauseVoice().
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Changes the stream volume.
| volume | Volume, 0-100 |
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Changes the volume of a playing voice.
| voice | Voice handle returned by playVoice() |
| volume | Volume, 0-100 |
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Releases everything init() allocated. Call stop() first.
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Starts the audio backend running (eg. registers the DSP/AX callback).
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Stops the audio backend.
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Stops the stream started by playStream().
Implemented in OgcAudioDriver, and WutAudioDriver.
|
pure virtual |
Stops a voice returned by playVoice() and frees its slot.
Implemented in OgcAudioDriver, and WutAudioDriver.