aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/Include/alBuffer.h7
-rw-r--r--OpenAL32/alBuffer.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h
index b25a35c6..b7d36642 100644
--- a/OpenAL32/Include/alBuffer.h
+++ b/OpenAL32/Include/alBuffer.h
@@ -15,12 +15,19 @@ typedef struct ALbuffer
{
ALenum format;
ALenum eOriginalFormat;
+
ALshort *data;
ALsizei size;
+
ALsizei frequency;
ALsizei padding;
ALenum state;
+
ALuint refcount; // Number of sources using this buffer (deletion can only occur when this is 0)
+
+ // Index to itself
+ ALuint buffer;
+
struct ALbuffer *next;
} ALbuffer;
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 09f692dc..2ebf42b0 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -106,6 +106,8 @@ ALAPI ALvoid ALAPIENTRY alGenBuffers(ALsizei n,ALuint *puiBuffers)
}
puiBuffers[i] = (ALuint)ALTHUNK_ADDENTRY(*list);
+ (*list)->buffer = puiBuffers[i];
+
(*list)->state = UNUSED;
device->BufferCount++;
i++;