mirror of
https://github.com/devZoGok/gameBase.git
synced 2026-08-26 19:43:28 +00:00
38 lines
678 B
C++
38 lines
678 B
C++
#ifndef SOUND_MANAGER_H
|
|
#define SOUND_MANAGER_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "util.h"
|
|
|
|
namespace sf{
|
|
class Music;
|
|
}
|
|
|
|
namespace gameBase{
|
|
class SoundManager{
|
|
public:
|
|
static SoundManager* getSingleton();
|
|
void update();
|
|
void play(std::vector<std::string>, int, int, bool, bool);
|
|
void clearPlaylist();
|
|
private:
|
|
struct Track{
|
|
std::string path = "";
|
|
sf::Music *soundObj = nullptr;
|
|
|
|
Track(std::string);
|
|
};
|
|
SoundManager(){}
|
|
|
|
int currentTrackId = 0, volume, trackDelay;
|
|
bool loop, shuffle;
|
|
s64 lastPlayTime = 0;
|
|
std::vector<Track> currentPlaylistTracks;
|
|
std::vector<std::string> originalPlaylist;
|
|
};
|
|
}
|
|
|
|
#endif
|