mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Add DSP emulation interface
Co-Authored-By: PSISP <12768103+psi-rockin@users.noreply.github.com>
This commit is contained in:
parent
3c25be4c63
commit
0a51a80d91
14 changed files with 426 additions and 6 deletions
21
src/core/audio/dsp_core.cpp
Normal file
21
src/core/audio/dsp_core.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "audio/dsp_core.hpp"
|
||||
|
||||
#include "audio/null_core.hpp"
|
||||
#include "audio/teakra_core.hpp"
|
||||
|
||||
std::unique_ptr<Audio::DSPCore> Audio::makeDSPCore(DSPCore::Type type, Memory& mem) {
|
||||
std::unique_ptr<DSPCore> core;
|
||||
|
||||
switch (type) {
|
||||
case DSPCore::Type::Null: core = std::make_unique<NullDSP>(mem); break;
|
||||
case DSPCore::Type::Teakra: core = std::make_unique<TeakraDSP>(mem); break;
|
||||
|
||||
default:
|
||||
Helpers::warn("Invalid DSP core selected!");
|
||||
core = std::make_unique<NullDSP>(mem);
|
||||
break;
|
||||
}
|
||||
|
||||
mem.setDSPMem(core->getDspMemory());
|
||||
return core;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue