summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2025-01-31 22:54:09 -0600
committerKiritoDv <kiritodev01@gmail.com>2025-01-31 22:54:09 -0600
commit228bbdc99e5045193198e3933c73c417f355d57b (patch)
treea7d8f69c6011cddc806fd5060d3e20cff62b2a8f
parentd824ec401b7deddb11fb79fb6a7ad70a2209a170 (diff)
Probably fixed interpolation on linux, and EU crashes
-rw-r--r--src/audio/audio_load.c17
-rw-r--r--src/audio/audio_seqplayer.c5
-rw-r--r--src/port/Engine.cpp3
3 files changed, 5 insertions, 20 deletions
diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c
index 8b950e2b..c5804b62 100644
--- a/src/audio/audio_load.c
+++ b/src/audio/audio_load.c
@@ -816,21 +816,9 @@ void AudioLoad_Init(void) {
s32 i;
s32 j;
s32 numFonts;
- s32 dwordsLeft;
- u64* clearContext;
void* ramAddr;
gAudioResetTimer = 0;
-
- for (i = 0; i < gAudioHeapSize / 8; i++) {
- *((u64*) gAudioHeap + i) = 0;
- }
-
- clearContext = gAudioContextStart;
- dwordsLeft = ((uintptr_t) gAudioContextEnd - (uintptr_t) gAudioContextStart) / 8;
- for (; dwordsLeft >= 0; dwordsLeft--) {
- *clearContext++ = 0;
- }
// TODO: osTVType should be unnecessary
gMaxTempoTvTypeFactors = 16.713f;
gRefreshRate = 60;
@@ -874,11 +862,6 @@ void AudioLoad_Init(void) {
gSampleBankTable = SEGMENTED_TO_VIRTUAL(gSampleBankTableInit);
gSeqFontTable = SEGMENTED_TO_VIRTUAL(gSeqFontTableInit);
gNumSequences = gSequenceTable->base.numEntries;
-
- // AudioLoad_InitTable(gSequenceTable, LOAD_ASSET(gAudioSeq), gSequenceMedium);
- // AudioLoad_InitTable(gSoundFontTable, LOAD_ASSET(gAudioBank), gSoundFontMedium);
- // AudioLoad_InitTable(gSampleBankTable, LOAD_ASSET(gAudioTable), gSampleBankMedium);
-
numFonts = gSoundFontTable->base.numEntries;
gSoundFontList = AudioHeap_Alloc(&gInitPool, numFonts * sizeof(SoundFont));
diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c
index 9ddaf70c..820d1cc3 100644
--- a/src/audio/audio_seqplayer.c
+++ b/src/audio/audio_seqplayer.c
@@ -1,6 +1,7 @@
#include "sys.h"
#include "sf64audio_provisional.h"
#include "endianness.h"
+#include "port/Engine.h"
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)
#define PORTAMENTO_MODE(x) ((x).mode & ~0x80)
@@ -1280,6 +1281,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
seqPlayer->tempoAcc = (seqPlayer->tempoAcc - gMaxTempo) & 0xFFFF; // fake?
+ bool euRunning = GameEngine_HasVersion(SF64_VER_EU);
if (seqPlayer->delay > 1) {
seqPlayer->delay--;
@@ -1287,6 +1289,9 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
temp_s0 = &seqPlayer->scriptState;
seqPlayer->recalculateVolume = true;
while (true) {
+ if(euRunning && temp_s0->pc == NULL){
+ break;
+ }
temp_s2 = AudioSeq_ScriptReadU8(temp_s0);
if (temp_s2 == 0xFF) {
if (temp_s0->depth == 0) {
diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp
index 7cac8971..887523f3 100644
--- a/src/port/Engine.cpp
+++ b/src/port/Engine.cpp
@@ -62,7 +62,6 @@ GameEngine::GameEngine() {
std::vector<std::string> archiveFiles;
const std::string main_path = Ship::Context::GetPathRelativeToAppDirectory("sf64.o2r");
const std::string assets_path = Ship::Context::GetPathRelativeToAppDirectory("starship.o2r");
- const std::string mod_path = Ship::Context::GetPathRelativeToAppDirectory("mods/sf64jp.o2r");
#ifdef _WIN32
AllocConsole();
@@ -86,8 +85,6 @@ GameEngine::GameEngine() {
if (ShowYesNoBox("Extraction Complete", "ROM Extracted. Extract another?") == IDYES) {
if(!GenAssetFile()){
ShowMessage("Error", "An error occured, no O2R file was generated.");
- } else {
- archiveFiles.push_back(mod_path);
}
}
} else {