29#ifndef NOMLIB_AL_AUDIO_DEVICE_HEADERS
30#define NOMLIB_AL_AUDIO_DEVICE_HEADERS
32#include "nomlib/config.hpp"
33#include "nomlib/core/IObject.hpp"
34#include "nomlib/math/Point3.hpp"
35#include "nomlib/audio/audio_defs.hpp"
36#include "nomlib/audio/SoundFile.hpp"
42struct ALCdevice_struct;
43struct ALCcontext_struct;
51ALCdevice_struct* current_device();
52ALCcontext_struct* current_context();
54void free_audio_device(ALCdevice_struct* dev);
55void free_audio_context(ALCcontext_struct* ctx);
58process_addr(
const char* token);
64bool extension_available(
const char* key);
73uint32 enum_available(
const char* key);
76context_extension(
const char* key, ALCdevice_struct* target);
78typedef std::vector<std::string> device_name_list;
80const char* default_output_device_name(ALCdevice_struct* target);
81const char* default_input_device_name(ALCdevice_struct* target);
84device_name_list output_device_names(
void* target);
87device_name_list input_device_names(
void* target);
89int refresh_rate(
void* target);
90bool sync_context(
void* target);
93int sample_rate(
void* target);
98int max_mono_sources(
void* target);
99int max_stereo_sources(
void* target);
102int max_sources(
void* target);
107bool cap(uint32 caps, uint32 key);
108void set_cap(uint32* caps, uint32 format);
113 void* impl =
nullptr;
121 ALCdevice_struct*
dev =
nullptr;
124 ALCcontext_struct*
ctx =
nullptr;
128 const char* name =
"ALAudioDevice";
132 uint32 capabilities = CAPS_UNDEFINED;
137 typedef std::function<device_name_list(
ALAudioDevice*)> output_devs_func;
139 output_devs_func enumerate_output_devices;
154int num_audio_devices();
Abstract base class for an instance of the audio hardware interface.
ALCcontext_struct * ctx
Audio device context.
ALCdevice_struct * dev
Audio device handle.