Encapulation of the raylib Music.
More...
#include <RlMusic.hpp>
Encapulation of the raylib Music.
◆ RlMusic() [1/2]
| raylib::audio::RlMusic::RlMusic |
( |
const std::string & |
fileName | ) |
|
|
explicit |
Construct a new RlMusic object from a file.
- Parameters
-
◆ RlMusic() [2/2]
| raylib::audio::RlMusic::RlMusic |
( |
const std::string & |
fileType, |
|
|
unsigned char * |
data, |
|
|
const int & |
dataSize |
|
) |
| |
|
explicit |
Construct a new RlMusic object from data.
- Parameters
-
| fileType | the file type |
| data | the data |
| dataSize | the data size |
◆ ~RlMusic()
| raylib::audio::RlMusic::~RlMusic |
( |
| ) |
|
◆ getTimeLength()
| float raylib::audio::RlMusic::getTimeLength |
( |
| ) |
|
Get music time length (in seconds)
- Returns
- the time length
◆ getTimePlayed()
| float raylib::audio::RlMusic::getTimePlayed |
( |
| ) |
|
Get current music time played (in seconds)
- Returns
- the time played
◆ getVolume()
| const float & raylib::audio::RlMusic::getVolume |
( |
| ) |
const |
Get the volume of the music stream.
- Returns
- the volume
◆ isLooping()
| const bool & raylib::audio::RlMusic::isLooping |
( |
| ) |
const |
Check if the music stream is looping.
- Returns
- true if the music stream is looping
◆ isPlaying()
| bool raylib::audio::RlMusic::isPlaying |
( |
| ) |
|
Check if the music stream is playing.
- Returns
- true if the music stream is playing
◆ pause()
| void raylib::audio::RlMusic::pause |
( |
| ) |
|
Pause the music stream playing.
◆ play()
| void raylib::audio::RlMusic::play |
( |
| ) |
|
◆ resume()
| void raylib::audio::RlMusic::resume |
( |
| ) |
|
Resume the music stream playing.
◆ seek()
| void raylib::audio::RlMusic::seek |
( |
const float & |
position | ) |
|
Seek the music stream to a position in seconds (set the current playing position)
- Parameters
-
◆ setLooping()
| void raylib::audio::RlMusic::setLooping |
( |
const bool & |
loop | ) |
|
Set if the music stream is looped.
- Parameters
-
| loop | if the music stream is looped |
◆ setPitch()
| void raylib::audio::RlMusic::setPitch |
( |
const float & |
pitch | ) |
|
Set pitch for a music (1.0 is base level)
- Parameters
-
◆ setVolume()
| void raylib::audio::RlMusic::setVolume |
( |
const float & |
volume | ) |
|
Set the volume of the music stream (1.0 is max level)
- Parameters
-
◆ stop()
| void raylib::audio::RlMusic::stop |
( |
| ) |
|
Stop the music stream playing.
◆ update()
| void raylib::audio::RlMusic::update |
( |
| ) |
|
Updates buffers for music streaming.
The documentation for this class was generated from the following files: