mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-04-28 12:27:59 +03:00
audio WIP
This commit is contained in:
parent
2c64c81962
commit
984e290d16
3 changed files with 11 additions and 1 deletions
|
@ -418,6 +418,10 @@ void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
|
||||||
|
|
||||||
void* AudioLoad_SyncLoadSeq(s32 seqId) {
|
void* AudioLoad_SyncLoadSeq(s32 seqId) {
|
||||||
AudioTable* table = AudioLoad_GetLoadTable(SEQUENCE_TABLE);
|
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);
|
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);
|
SoundFont* font = Audio_LoadFont(table->entries[fontId], fontId);
|
||||||
|
|
||||||
gSoundFontList[fontId] = *font;
|
gSoundFontList[fontId] = *font;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioLoad_SyncDma(uintptr_t devAddr, u8* ramAddr, u32 size, s32 medium) {
|
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;
|
D_80155D88 = (fontId << 8) + instId + 0x01000000;
|
||||||
return instrument;
|
return instrument;
|
||||||
}
|
}
|
||||||
|
printf("InstId: %d\n", instId);
|
||||||
return instrument;
|
return instrument;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,11 @@
|
||||||
|
|
||||||
#ifdef OTR_AUDIO
|
#ifdef OTR_AUDIO
|
||||||
extern "C" SoundFont* Audio_LoadFont(AudioTableEntry entry, uint32_t fontId) {
|
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
|
#else
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue