Had to rename sfml to sfmlbackend because on Windows the filesystem is case insensitive so include <SFML/*> was accidentally including _my_ <sfml/config.hpp> file.
This commit is contained in:
parent
f3f2e90cd2
commit
06ca57e5da
19 changed files with 38 additions and 36 deletions
|
@ -1,26 +0,0 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <SFML/Audio.hpp>
|
||||
|
||||
namespace sound {
|
||||
struct SoundPair {
|
||||
std::shared_ptr<sf::SoundBuffer> buffer;
|
||||
std::shared_ptr<sf::Sound> sound;
|
||||
};
|
||||
|
||||
struct SoundManager {
|
||||
std::unordered_map<std::string, SoundPair> sounds;
|
||||
};
|
||||
|
||||
void init();
|
||||
void load(const std::string& name, const std::string& path);
|
||||
void play(const std::string& name, bool loop=false);
|
||||
void play_at(const std::string& name, float x, float y, float z);
|
||||
void stop(const std::string& name);
|
||||
void mute(bool setting);
|
||||
bool playing(const std::string& name);
|
||||
SoundPair& get_sound_pair(const std::string& name);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue