-
Notifications
You must be signed in to change notification settings - Fork 0
/
Audio3DManager.h
90 lines (70 loc) · 1.77 KB
/
Audio3DManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef __CELESTIA__AUDIO_3D__MANAGER__H__
#define __CELESTIA__AUDIO_3D__MANAGER__H__
#include <AL/al.h>
#include <vector>
#include <string>
namespace Audio3D
{
class Manager {
public:
Manager(int *, char **);
static ALint intProperty(ALenum param)
{
return alGetInteger(param);
}
static ALfloat floatProperty(ALenum param)
{
return alGetFloat(param);
}
static ALdouble doubleProperty(ALenum param)
{
return alGetDouble(param);
}
static ALfloat dopplerFactor()
{
return floatProperty(AL_DOPPLER_FACTOR);
}
static ALfloat soundSpeed()
{
return floatProperty(AL_SPEED_OF_SOUND);
}
static ALint distanceModel()
{
return alGetInteger(AL_DISTANCE_MODEL);
}
static const ALchar *stringProperty(ALenum param)
{
return alGetString(param);
}
static const ALchar *vendor()
{
return stringProperty(AL_VENDOR);
}
static const ALchar *version()
{
return stringProperty(AL_VERSION);
}
static const ALchar *renderer()
{
return stringProperty(AL_RENDERER);
}
static const ALchar *extensions()
{
return stringProperty(AL_EXTENSIONS);
}
static void setModel(ALenum param)
{
alDistanceModel(param);
}
static void setDopplerFactor(ALfloat v)
{
alDopplerFactor(v);
}
static void setSoundSpeed(ALfloat v)
{
alSpeedOfSound(v);
}
static std::vector<std::string> devices();
};
}
#endif