Skip to content

Commit

Permalink
Change compressed data formats interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 28, 2004
1 parent 765b36b commit ddcc5c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion osx/alContext.c
Expand Up @@ -1045,7 +1045,7 @@ static ALvoid __alcMixContext(ALcontext *ctx, UInt8 *_dst,
// new buffer in queue? Prepare it if needed.
if ((buf->prepareBuffer) && (src->bufferReadIndex == 0))
{
if (!buf->prepareBuffer(src, buf))
if (!buf->prepareBuffer(ctx, src, buf))
{
src->bufferPos++; // oh well, skip it.
src->bufferReadIndex = 0;
Expand Down
11 changes: 7 additions & 4 deletions osx/alInternal.h
Expand Up @@ -219,8 +219,8 @@ typedef struct ALbuffer_struct
ALsizei bits;
ALsizei channels;
ALboolean compressed;
void *mixData; // guaranteed to be 16-byte aligned.
void *mixUnalignedPtr; // malloc() retval used to calculate mixData.
ALvoid *mixData; // guaranteed to be 16-byte aligned.
ALvoid *mixUnalignedPtr; // malloc() retval used to calculate mixData.
ALboolean inUse;
ALsizei allocatedSpace;
__alMixFunc mixFunc;
Expand All @@ -230,11 +230,14 @@ typedef struct ALbuffer_struct
// Called when a buffer is about to be played on a source.
// allocate source-instance data and store in src->opaque.
// Return AL_FALSE on a fatal error, AL_TRUE on success.
ALboolean (*prepareBuffer)(struct ALsource_struct *, struct ALbuffer_struct *);
ALboolean (*prepareBuffer)(struct ALcontext_struct *,
struct ALsource_struct *,
struct ALbuffer_struct *);

// called when source is done playing this buffer and isn't looping.
// Should free up source-instance data here.
ALvoid (*processedBuffer)(struct ALsource_struct *, struct ALbuffer_struct *);
ALvoid (*processedBuffer)(struct ALsource_struct *,
struct ALbuffer_struct *);

// called if a source is looping this buffer. Prepare to replay from
// start on next call to mixFunc.
Expand Down

0 comments on commit ddcc5c0

Please sign in to comment.