Pushed the final changes that got audio working!
This commit is contained in:
+2
-21
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user