Primary sound engine declarations.
More...
Go to the source code of this file.
Primary sound engine declarations.
C++ Extensions for sound engine declarations.
- Author
- Gregory Mitchell (me@gm.nosp@m.itch.nosp@m.215.x.nosp@m.yz)
- Version
- 0.3.0
- Date
- 2025-07-30
- Copyright
- Copyright (c) 2025
- Author
- Gregory Mitchell (me@gm.nosp@m.itch.nosp@m.215.x.nosp@m.yz)
- Version
- 0.3.0
- Date
- 2025-09-02
- Copyright
- Copyright (c) 2025
◆ Sound_getVolume()
int Sound_getVolume |
( |
const char * | soundFile, |
|
|
double * | volume ) |
Get the volume of a sound file.
- Parameters
-
soundFile | The path to the sound file. |
volume | Pointer to store the volume level (0.0 to 1.0). |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_getVolumeAll()
int Sound_getVolumeAll |
( |
double * | volume | ) |
|
Get the volume of all sound files.
- Parameters
-
volume | Pointer to store the volume level (0.0 to 1.0). |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_pause()
int Sound_pause |
( |
const char * | soundFile | ) |
|
Pause a sound file.
- Parameters
-
soundFile | The path to the sound file to pause. |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_pauseAll()
Pause all sound files.
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_play()
int Sound_play |
( |
const char * | soundFile | ) |
|
Play a sound file.
Supported formats:
Formats should be available on all platforms.
- Parameters
-
soundFile | The path to the sound file to play. |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_playLooped()
int Sound_playLooped |
( |
const char * | soundFile, |
|
|
int | loopCount ) |
Play a sound file in a loop.
- Parameters
-
soundFile | The path to the sound file to play. |
loopCount | The number of times to loop the sound. Use -1 for infinite looping. |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_resume()
int Sound_resume |
( |
const char * | soundFile | ) |
|
Resume a sound file.
- Parameters
-
soundFile | The path to the sound file to resume. |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_resumeAll()
Resume all sound files.
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_setVolume()
int Sound_setVolume |
( |
const char * | soundFile, |
|
|
double | volume ) |
Set the volume of a sound file.
- Parameters
-
soundFile | The path to the sound file. |
volume | The volume level (0.0 to 1.0). |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_setVolumeAll()
int Sound_setVolumeAll |
( |
double | volume | ) |
|
Set the volume of all sound files.
- Parameters
-
volume | The volume level (0.0 to 1.0). |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_stop()
int Sound_stop |
( |
const char * | soundFile | ) |
|
Stop a sound file.
- Parameters
-
soundFile | The path to the sound file to stop. |
- Returns
- int 0 on success, or a negative error code on failure.
◆ Sound_stopAll()
Stop all sound files.
- Returns
- int 0 on success, or a negative error code on failure.