mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
HLE DSP: Init/deinit sources better
This commit is contained in:
parent
5da93d17bd
commit
43a1c89478
2 changed files with 17 additions and 2 deletions
|
@ -14,6 +14,13 @@ namespace Audio {
|
|||
};
|
||||
}
|
||||
|
||||
HLE_DSP::HLE_DSP(Memory& mem, Scheduler& scheduler, DSPService& dspService) : DSPCore(mem, scheduler, dspService) {
|
||||
// Set up source indices
|
||||
for (int i = 0; i < sources.size(); i++) {
|
||||
sources[i].index = i;
|
||||
}
|
||||
}
|
||||
|
||||
void HLE_DSP::resetAudioPipe() {
|
||||
#define DSPOffset(var) (0x8000 + offsetof(Audio::HLE::SharedMemory, var) / 2)
|
||||
|
||||
|
@ -56,6 +63,10 @@ namespace Audio {
|
|||
e.clear();
|
||||
}
|
||||
|
||||
for (auto& source : sources) {
|
||||
source.reset();
|
||||
}
|
||||
|
||||
// Note: Reset audio pipe AFTER resetting all pipes, otherwise the new data will be yeeted
|
||||
resetAudioPipe();
|
||||
}
|
||||
|
@ -189,6 +200,7 @@ namespace Audio {
|
|||
SharedMemory& write = writeRegion();
|
||||
|
||||
for (int source = 0; source < sourceCount; source++) {
|
||||
//updateSourceConfig(sources[source]);
|
||||
Helpers::panic("Panda");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue