mirror of
https://github.com/HarbourMasters/Starship
synced 2026-05-23 06:54:39 -04:00
audio WIP
This commit is contained in:
@@ -418,6 +418,10 @@ void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
|
||||
|
||||
void* AudioLoad_SyncLoadSeq(s32 seqId) {
|
||||
AudioTable* table = AudioLoad_GetLoadTable(SEQUENCE_TABLE);
|
||||
char* seqPath = ResourceGetNameByCrc((uint64_t) table->entries[seqId].romAddr);
|
||||
printf("seqId: %d\n", seqId);
|
||||
printf("seqPath: %s\n", seqPath);
|
||||
|
||||
return ResourceGetDataByCrc((uint64_t) table->entries[seqId].romAddr);
|
||||
}
|
||||
|
||||
@@ -612,6 +616,7 @@ void AudioLoad_RelocateFont(s32 fontId, uintptr_t fontBaseAddr, SampleBankRelocI
|
||||
SoundFont* font = Audio_LoadFont(table->entries[fontId], fontId);
|
||||
|
||||
gSoundFontList[fontId] = *font;
|
||||
|
||||
}
|
||||
|
||||
void AudioLoad_SyncDma(uintptr_t devAddr, u8* ramAddr, u32 size, s32 medium) {
|
||||
|
||||
@@ -214,6 +214,7 @@ Instrument* Audio_GetInstrument(s32 fontId, s32 instId) {
|
||||
D_80155D88 = (fontId << 8) + instId + 0x01000000;
|
||||
return instrument;
|
||||
}
|
||||
printf("InstId: %d\n", instId);
|
||||
return instrument;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
|
||||
#ifdef OTR_AUDIO
|
||||
extern "C" SoundFont* Audio_LoadFont(AudioTableEntry entry, uint32_t fontId) {
|
||||
return (SoundFont*) ResourceGetDataByCrc((uint64_t) gSoundFontTable->entries[fontId].romAddr);
|
||||
auto crc = (uint64_t) gSoundFontTable->entries[fontId].romAddr;
|
||||
auto path = ResourceGetNameByCrc(crc);
|
||||
printf("Font: %s\n", path);
|
||||
|
||||
return (SoundFont*) ResourceGetDataByCrc(crc);
|
||||
}
|
||||
#else
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
Reference in New Issue
Block a user