aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-30 16:56:23 -0800
committerChris Robinson <[email protected]>2018-11-30 16:56:23 -0800
commit4b7ac4a6ed290182de945274afd90fc4cece0283 (patch)
tree93cdffafcbd6388bd5fea1bdbf874b92a729b094 /OpenAL32/Include
parent364850e8f9a224144c91c7b562d44321b7aa4505 (diff)
Don't bother making ALvoiceProps dynamically sized
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alSource.h1
-rw-r--r--OpenAL32/Include/alu.h24
2 files changed, 10 insertions, 15 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 2cbc5ddc..62c6fae3 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -7,7 +7,6 @@
#include "almalloc.h"
#include "atomic.h"
-#define MAX_SENDS 16
#define DEFAULT_SENDS 2
#ifdef __cplusplus
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index e178a5a6..2ff69058 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -17,11 +17,13 @@
#include "math_defs.h"
#include "filters/defs.h"
#include "filters/nfc.h"
+#include "almalloc.h"
enum class DistanceModel;
-#define MAX_PITCH (255)
+#define MAX_PITCH 255
+#define MAX_SENDS 16
/* Maximum number of samples to pad on either end of a buffer for resampling.
* Note that both the beginning and end need padding!
@@ -29,10 +31,6 @@ enum class DistanceModel;
#define MAX_RESAMPLE_PADDING 24
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct BSincTable;
struct ALsource;
struct ALbufferlistitem;
@@ -144,8 +142,6 @@ typedef struct SendParams {
struct ALvoiceProps {
- std::atomic<ALvoiceProps*> next;
-
ALfloat Pitch;
ALfloat Gain;
ALfloat OuterGain;
@@ -194,7 +190,11 @@ struct ALvoiceProps {
ALfloat HFReference;
ALfloat GainLF;
ALfloat LFReference;
- } Send[];
+ } Send[MAX_SENDS];
+
+ std::atomic<ALvoiceProps*> next;
+
+ DEF_NEWDEL(ALvoiceProps)
};
#define VOICE_IS_STATIC (1<<0)
@@ -203,13 +203,13 @@ struct ALvoiceProps {
#define VOICE_HAS_NFC (1<<3)
typedef struct ALvoice {
- ALvoiceProps *Props;
-
std::atomic<ALvoiceProps*> Update;
std::atomic<ALuint> SourceID;
std::atomic<bool> Playing;
+ ALvoiceProps Props;
+
/**
* Source offset in samples, relative to the currently playing buffer, NOT
* the whole queue, and the fractional (fixed-point) offset to the next
@@ -487,8 +487,4 @@ extern ALfloat ConeScale;
extern ALfloat ZScale;
extern ALboolean OverrideReverbSpeedOfSound;
-#ifdef __cplusplus
-}
-#endif
-
#endif