From 5a50c46c22e7e6c5f119613584d826bc7b7b4a61 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 14 Feb 2017 19:59:39 -0800 Subject: Make ALsourceProps' Send array dynamically sized ALsourceProps' Send[] array is placed at the end of the struct, and given an indeterminate size. Extra space is allocated at the end of each struct given the number of auxiliary sends set for the device. --- OpenAL32/Include/alMain.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenAL32/Include/alMain.h') 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); -- cgit v1.2.3