summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-10-02 20:25:30 -0700
committerChris Robinson <[email protected]>2014-10-02 20:25:30 -0700
commit79fb86d8f79459b0144e4de750e9b6f07c4de473 (patch)
tree6613ad65547918277b267d9e7d9a110b89dad4f7 /OpenAL32
parent95ba18cf4e52c439b85ece2daf0b404fa69c7b70 (diff)
Store default speaker configurations in a struct
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 62bb0328..2c7784c8 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -578,6 +578,19 @@ enum DeviceType {
};
+/* The maximum number of Ambisonics coefficients. For a given order (o), the
+ * size needed will be (o+1)**2, thus zero-order has 1, first-order has 4,
+ * second-order has 9, and third-order has 16. */
+#define MAX_AMBI_COEFFS 16
+
+typedef struct ChannelConfig {
+ enum Channel ChanName;
+ ALfloat Angle;
+ ALfloat Elevation;
+ ALfloat Coeff[MAX_AMBI_COEFFS];
+} ChannelConfig;
+
+
/* Size for temporary storage of buffer data, in ALfloats. Larger values need
* more memory, while smaller values may need more iterations. The value needs
* to be a sensible size, however, as it constrains the max stepping value used
@@ -585,11 +598,6 @@ enum DeviceType {
*/
#define BUFFERSIZE (2048u)
-/* The maximum number of Ambisonics coefficients. For a given order (o), the
- * size needed will be (o+1)**2, thus zero-order has 1, first-order has 4,
- * second-order has 9, and third-order has 16. */
-#define MAX_AMBI_COEFFS 16
-
struct ALCdevice_struct
{
RefCount ref;
@@ -653,12 +661,7 @@ struct ALCdevice_struct
enum Channel ChannelName[MaxChannels];
/* This only counts positional speakers, i.e. not including LFE. */
- struct {
- enum Channel ChanName;
- ALfloat Angle;
- ALfloat Elevation;
- ALfloat Coeff[MAX_AMBI_COEFFS];
- } Speaker[MaxChannels];
+ ChannelConfig Speaker[MaxChannels];
ALuint NumSpeakers;
ALuint64 ClockBase;