aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-16 12:57:06 -0800
committerChris Robinson <[email protected]>2018-01-16 12:57:06 -0800
commitbf8c889631f48f9112987eb0f26e7c6eaa2429aa (patch)
treea3a041528ea7e19a0e7446d6eddc6bffdf40a047
parent273dca2fa0fc4b009735010fd42c2c53649f872c (diff)
Define DECL_VLA where it's used
-rw-r--r--OpenAL32/Include/alMain.h6
-rw-r--r--OpenAL32/sample_cvt.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 4f6d0b49..c9439770 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -173,12 +173,6 @@ typedef ALuint64SOFT ALuint64;
*/
#define FAM_SIZE(T, M, N) (offsetof(T, M) + sizeof(((T*)NULL)->M[0])*(N))
-#ifdef HAVE_C99_VLA
-#define DECL_VLA(T, _name, _size) T _name[(_size)]
-#else
-#define DECL_VLA(T, _name, _size) T *_name = alloca((_size) * sizeof(T))
-#endif
-
static const union {
ALuint u;
diff --git a/OpenAL32/sample_cvt.c b/OpenAL32/sample_cvt.c
index 58cad523..535d8b6d 100644
--- a/OpenAL32/sample_cvt.c
+++ b/OpenAL32/sample_cvt.c
@@ -15,6 +15,13 @@
#include "alBuffer.h"
+#ifdef HAVE_C99_VLA
+#define DECL_VLA(T, _name, _size) T _name[(_size)]
+#else
+#define DECL_VLA(T, _name, _size) T *_name = alloca((_size) * sizeof(T))
+#endif
+
+
/* IMA ADPCM Stepsize table */
static const int IMAStep_size[89] = {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19,