aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h9
-rw-r--r--OpenAL32/Include/alSource.h8
2 files changed, 13 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 2573c836..947a16ba 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -356,6 +356,13 @@ inline ALuint NextPowerOf2(ALuint value)
return value+1;
}
+/** Round up a value to the next multiple. */
+inline size_t RoundUp(size_t value, size_t r)
+{
+ value += r-1;
+ return value - (value%r);
+}
+
/* Fast float-to-int conversion. Assumes the FPU is already in round-to-zero
* mode. */
inline ALint fastf2i(ALfloat f)
@@ -813,6 +820,8 @@ ALCcontext *GetContextRef(void);
void ALCcontext_IncRef(ALCcontext *context);
void ALCcontext_DecRef(ALCcontext *context);
+void AllocateVoices(ALCcontext *context, ALsizei num_voices, ALsizei old_sends);
+
void AppendAllDevicesList(const ALCchar *name);
void AppendCaptureDeviceList(const ALCchar *name);
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index d45e5d9c..cc9dd763 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -23,6 +23,8 @@ typedef struct ALbufferlistitem {
struct ALsourceProps {
+ ATOMIC(struct ALsourceProps*) next;
+
ATOMIC(ALfloat) Pitch;
ATOMIC(ALfloat) Gain;
ATOMIC(ALfloat) OuterGain;
@@ -69,14 +71,12 @@ struct ALsourceProps {
ATOMIC(ALfloat) HFReference;
ATOMIC(ALfloat) GainLF;
ATOMIC(ALfloat) LFReference;
- } Send[MAX_SENDS];
-
- ATOMIC(struct ALsourceProps*) next;
+ } Send[];
};
typedef struct ALvoice {
- struct ALsourceProps Props;
+ struct ALsourceProps *Props;
struct ALsource *Source;