ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
sound.h
Go to the documentation of this file.
1
8
9#ifndef ASW_SOUND_H
10#define ASW_SOUND_H
11
12#include "./types.h"
13
14namespace asw::sound {
22 void play(const asw::Sample& sample,
23 int volume = 255,
24 unsigned char pan = 128,
25 int loop = 0);
26
32 void playMusic(const asw::Music& sample, int volume = 255);
33
36 void stopMusic();
37
38} // namespace asw::sound
39
40#endif // ASW_SOUND_H
void play(const asw::Sample &sample, int volume=255, unsigned char pan=128, int loop=0)
Play a sample.
Definition sound.cpp:5
void stopMusic()
Stop the currently playing music.
Definition sound.cpp:20
void playMusic(const asw::Music &sample, int volume=255)
Play a music sample.
Definition sound.cpp:15
std::shared_ptr< Mix_Chunk > Sample
Alias for a shared pointer to an Mix_Chunk.
Definition types.h:26
std::shared_ptr< Mix_Music > Music
Alias for a shared pointer to an Mix_Music.
Definition types.h:29
Types used throughout the ASW library.