Doly C++ SDK v1.00
Loading...
Searching...
No Matches
SoundControl.h
Go to the documentation of this file.
1#pragma once
2#include "SoundEvent.h"
3
24
28enum class SoundState :uint8_t
29{
33};
34
35namespace SoundControl
36{
45 int8_t init();
46
54 int8_t dispose();
55
69 int8_t play(std::string file_name, uint16_t id);
70
74 void Abort();
75
81
86 bool isActive();
87
94 int8_t setVolume(uint8_t volume);
95
103 float getVersion();
104
105};
SoundState
Sound activity state.
Definition SoundControl.h:29
@ STOP
Definition SoundControl.h:31
@ PLAY
Definition SoundControl.h:32
@ SET
Definition SoundControl.h:30
Event registration helpers for the sound subsystem.
Definition SoundControl.h:36
int8_t setVolume(uint8_t volume)
Set playback volume as a percentage.
SoundState getState()
Get current sound playback state.
bool isActive()
Check whether the sound subsystem is active (initialized).
float getVersion()
Get current library version.
int8_t dispose()
Dispose/stop the sound subsystem and release resources.
int8_t init()
Initialize sound control.
void Abort()
Abort the currently playing sound (if any).
int8_t play(std::string file_name, uint16_t id)
Start playing a sound file (non-blocking).