Moved sound reset to mod-audio

This commit is contained in:
KiritoDv 2021-06-29 21:22:39 +00:00
parent a6a5e29dc5
commit 2369bf8ce1
3 changed files with 11 additions and 13 deletions

View File

@ -13,6 +13,10 @@ extern "C" {
#include "PR/libaudio.h"
#include "audio/load.h"
#include "audio/external.h"
#include "game/sound_init.h"
#include "game/level_update.h"
#include "game/area.h"
}
#include <iostream>
@ -77,16 +81,16 @@ namespace MoonInternal {
void buildAudioCache(vector<int> order){
soundCache.clear();
for(int i=0; i < order.size(); i++){
for(int i = 0; i < order.size(); i++)
soundCache.push_back(Moon::addons[order[i]]);
}
Moon::setSoundEntry(soundCache[soundCache.size() - 1]->sounds);
}
void resetSound(){
backgroundQueueSize = sBackgroundMusicQueueSize;
void resetSoundSystem(){
sound_reset(0);
play_music(SEQ_PLAYER_LEVEL, gCurrentArea->musicParam2, 0);
lower_background_noise(1);
}
void setupSoundEngine( string state ){

View File

@ -17,6 +17,7 @@ namespace MoonInternal {
void buildSoundCache(std::vector<int> order);
void* loadSoundData(const char* fullpath);
void buildAudioCache(std::vector<int> order);
void resetSoundSystem();
}
#endif

View File

@ -13,10 +13,6 @@ extern "C" {
#include "sm64.h"
#include "gfx_dimensions.h"
#include "pc/configfile.h"
#include "game/sound_init.h"
#include "audio/external.h"
#include "game/level_update.h"
#include "game/area.h"
}
BitModule* currentPack;
@ -61,10 +57,7 @@ void rebuildTextureCache(){
reverse(order.begin(), order.end());
MoonInternal::buildTextureCache(order);
MoonInternal::buildAudioCache(order);
sound_reset(0);
play_music(SEQ_PLAYER_LEVEL, gCurrentArea->musicParam2, 0);
lower_background_noise(1);
MoonInternal::resetSoundSystem();
}
void MoonAddonsScreen::changeScroll(int idx){