mirror of https://github.com/sm64pc/sm64pc.git
Moved sound reset to mod-audio
This commit is contained in:
parent
a6a5e29dc5
commit
2369bf8ce1
|
@ -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 ){
|
||||
|
|
|
@ -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
|
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue