45 static std::vector<std::string> enumerate_devices();
47 static std::string get_default_device_name();
51 explicit OALContext(
const std::string& device_name);
59 std::string get_device_name()
const;
63 static bool decode_sound_file(
const void* data,
size_t data_length,
OALSoundFormat& format, std::vector<int16_t>& memory_buffer);
65 static bool load_sound_file(
const std::string& filepath,
OALSoundFormat& format, std::vector<int16_t>& memory_buffer);
67 void create_buffer(
const std::string& symbolic_name,
const OALSoundFormat& format,
const void* data,
size_t data_length);
77 void load_sample(std::string filepath, std::string symbolic_name =
"");
96 void load_sample(std::string symbolic_name,
const void* data,
size_t data_length);
112 void load_samples(std::string folder,
bool recursive =
false);
124 ALuint get_buffer_id(std::string sound_name)
const;
133 std::string get_error_string();
156 void set_HRTF(
bool active);
163 ALCdevice* get_native_device();
170 ALCcontext* get_native_context();
173 ALCdevice* oal_device =
nullptr;
174 ALCcontext* oal_context =
nullptr;
177 std::map<std::string, ALuint> sample_buffers;
This class provides easy sample loading, device enumeration and error retrieval.