You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
518 B
23 lines
518 B
2 weeks ago
|
#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);
|
||
|
void play_at(const std::string name, float x, float y, float z);
|
||
|
}
|