mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 19:13:42 +00:00
Note about comments in these files: The libultra audio library was originally available to developers in source code form, unlike most of libultra. These files are based on these source code forms, adapted to meet the style of this project. The comments in the files as of this commit are, apart from the style, comments from the original SGI authors.
15 lines
344 B
C
15 lines
344 B
C
#include "libaudio.h"
|
|
#include "synthInternals.h"
|
|
|
|
void* alHeapDBAlloc(u8* file, s32 line, ALHeap* hp, s32 num, s32 size) {
|
|
s32 bytes;
|
|
u8* ptr = NULL;
|
|
|
|
bytes = (num * size + AL_CACHE_ALIGN) & ~AL_CACHE_ALIGN;
|
|
|
|
if (hp->cur + bytes <= hp->base + hp->len) {
|
|
ptr = hp->cur;
|
|
hp->cur += bytes;
|
|
}
|
|
return ptr;
|
|
}
|