My Project
MySound.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4 ** File description:
5 ** MySound
6 */
7 
8 #ifndef MYSOUND_HPP_
9 #define MYSOUND_HPP_
10 
11 #include <string>
12 #include "raylib.h"
13 
18 class MySound {
19  public:
24  MySound(std::string const &texturePath);
29  ~MySound();
30 
35  void play();
40  void playMulti();
45  void stop();
50  void pause();
55  void resume();
56 
63  bool isPlaying() const;
69  void setVolume(float volume);
70 
71  protected:
72  private:
73  Sound _sound;
74 };
75 
76 #endif /* !MYSOUND_HPP_ */
MySound::MySound
MySound(std::string const &texturePath)
Construct a new My Sound object.
Definition: MySound.cpp:11
MySound::~MySound
~MySound()
Destroy the My Sound object.
Definition: MySound.cpp:18
MySound::play
void play()
Play the sound.
Definition: MySound.cpp:23
MySound::setVolume
void setVolume(float volume)
Set the volume of the sound.
Definition: MySound.cpp:53
MySound::isPlaying
bool isPlaying() const
Check if the sound is playing.
Definition: MySound.cpp:48
MySound::stop
void stop()
Stop the sound.
Definition: MySound.cpp:33
MySound::resume
void resume()
Resume the sound.
Definition: MySound.cpp:43
MySound
MySound class.
Definition: MySound.hpp:18
MySound::playMulti
void playMulti()
Play the sound using a multichannel buffer pool.
Definition: MySound.cpp:28
MySound::pause
void pause()
Pause the sound.
Definition: MySound.cpp:38