Store the bufferID in the buffer struct

This commit is contained in:
Chris Robinson
2009-10-22 08:53:59 -07:00
parent 8501fce38b
commit 8d807add41
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -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;
+2
View File
@@ -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++;