|
Raylib C++
1.0.0
Encapsulates the raylib library
|
Encapulation of the raylib Sound. More...
#include <RlSound.hpp>


Public Member Functions | |
| RlSound (const Sound &sound) | |
| Construct a new RlSound object from the raylib Sound. More... | |
| RlSound (const std::string &fileName) | |
| Construct a new RlSound object from a file. More... | |
| RlSound (const RlWave &wave) | |
| Construct a new RlSound object from a RlWave. More... | |
| ~RlSound () | |
| Destroy the RlSound object. More... | |
| void | update (const void *data, const int &samplesCount) |
| Update sound buffer with new data. More... | |
| void | play () |
| Play the sound. More... | |
| void | stop () |
| Stop the sound. More... | |
| void | pause () |
| Pause the sound. More... | |
| void | resume () |
| Resume the sound. More... | |
| void | playMulti () |
| Play a sound (using multichannel buffer pool) More... | |
| bool | isPlaying () |
| Check if a sound is currently playing. More... | |
| void | setVolume (const float &volume) |
| Set volume for a sound (1.0 is max level) More... | |
| const float & | getVolume () const |
| Get the volume of a sound. More... | |
| void | setPitch (const float &pitch) |
| Set pitch for a sound (1.0 is base level) More... | |
Encapulation of the raylib Sound.
Forward declaration
|
explicit |
Construct a new RlSound object from the raylib Sound.
| sound | the raylib Sound |
|
explicit |
Construct a new RlSound object from a file.
| fileName | the name of the file |
|
explicit |
| raylib::audio::RlSound::~RlSound | ( | ) |
Destroy the RlSound object.
| const float & raylib::audio::RlSound::getVolume | ( | ) | const |
Get the volume of a sound.
| bool raylib::audio::RlSound::isPlaying | ( | ) |
Check if a sound is currently playing.
| void raylib::audio::RlSound::pause | ( | ) |
Pause the sound.
| void raylib::audio::RlSound::play | ( | ) |
Play the sound.
| void raylib::audio::RlSound::playMulti | ( | ) |
Play a sound (using multichannel buffer pool)

| void raylib::audio::RlSound::resume | ( | ) |
Resume the sound.
| void raylib::audio::RlSound::setPitch | ( | const float & | pitch | ) |
Set pitch for a sound (1.0 is base level)
| pitch | the pitch |
| void raylib::audio::RlSound::setVolume | ( | const float & | volume | ) |
Set volume for a sound (1.0 is max level)
| volume | the volume |

| void raylib::audio::RlSound::stop | ( | ) |
Stop the sound.
| void raylib::audio::RlSound::update | ( | const void * | data, |
| const int & | samplesCount | ||
| ) |
Update sound buffer with new data.
| data | the new data |
| samplesCount | the number of samples |
1.8.17