mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-13 22:24:17 +01:00
28 lines
389 B
C++
28 lines
389 B
C++
#pragma once
|
|
#include <vector>
|
|
#include <SFML/Audio.hpp>
|
|
|
|
class SoundManager
|
|
{
|
|
public:
|
|
SoundManager();
|
|
|
|
void playSound(const std::string& fileName);
|
|
|
|
bool playBackground(const std::string& fileName);
|
|
|
|
void pause(bool p);
|
|
|
|
private:
|
|
|
|
struct PlayingSound
|
|
{
|
|
sf::Sound sound;
|
|
sf::SoundBuffer buffer;
|
|
};
|
|
|
|
std::vector<PlayingSound> sounds;
|
|
|
|
sf::SoundStream* backgroundNoise;
|
|
|
|
}; |