Pushed the final changes that got audio working!

This commit is contained in:
MeltyPlayer
2022-11-06 20:22:00 -06:00
parent 7bd0cc9a2c
commit 3a4115e8f6
17 changed files with 274 additions and 371 deletions
+2 -21
View File
@@ -1,5 +1,6 @@
#include <ultra64.h>
#include "../../debug_print.h"
#include "heap.h"
#include "data.h"
#include "load.h"
@@ -252,26 +253,7 @@ void discard_sequence(s32 seqId) {
}
void *soundAlloc(struct SoundAllocPool *pool, u32 size) {
#if defined(VERSION_EU) || defined(VERSION_SH)
u8 *start;
u8 *pos;
u32 alignedSize = ALIGN16(size);
start = pool->cur;
if (start + alignedSize <= pool->start + pool->size) {
pool->cur += alignedSize;
for (pos = start; pos < pool->cur; pos++) {
*pos = 0;
}
} else {
eu_stubbed_printf_1("Heap OverFlow : Not Allocate %d!\n", size);
return NULL;
}
#ifdef VERSION_SH
pool->numAllocatedEntries++;
#endif
return start;
#else
DEBUG_PRINT("soundAlloc()");
u8 *start;
s32 last;
s32 i;
@@ -287,7 +269,6 @@ void *soundAlloc(struct SoundAllocPool *pool, u32 size) {
return NULL;
}
return start;
#endif
}
#ifdef VERSION_SH