Store the bufferID in the buffer struct
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user