mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 23:29:55 -06:00
Remove the last ConfigEntry
state (#1902)
* Get rid of `ConfigEntry::ExternalBIOSEnable` - Now the BIOS files themselves are checked - The frontend's `Config::ExternalBIOSEnable` is not affected * Add `JITArgs` * Pass the JIT status to the `ARM` constructors * Encapsulate `NDS::EnableJIT` * Pass `JITArgs` to `ARMJIT`'s constructor * Remove the `JIT_*` `ConfigEntry`s in favor of members - Allow all the JIT args to be set with `NDS::SetJITArgs` - Encapsulate the JIT-related parameters in `ARMJIT` so they can reset the block cache if changed - Update the active (or newly-created) console in the frontend with adjusted JIT args * Make audio bit depth and interpolation configurable in `NDSArgs` - Define enums for both - Give those settings default values in `NDSArgs` - Remove `ConfigEntry::AudioBitDepth` - Initialize these settings in the relevant SPU constructors * Move the last DSi-specific logic in `Reset` to its own subclass * Remove `ConfigEntry::DSi_FullBIOSBoot` - Add members to `DSi` instead for getting and setting this - Update the frontend to accommodate these changes * Oops, missed a spot * Remove `ConfigEntry::Firm_MAC` and `Platform::GetConfigArray` - Also move the MAC parsing code to `ROMManager` * Remove the last `ConfigEntry` state - Make GDB support configurable via members * Add some `#ifdef`s that I'd almost forgotten
This commit is contained in:
24
src/SPU.h
24
src/SPU.h
@ -27,10 +27,25 @@ namespace melonDS
|
||||
class NDS;
|
||||
class SPU;
|
||||
|
||||
enum class AudioBitDepth
|
||||
{
|
||||
Auto,
|
||||
_10Bit,
|
||||
_16Bit,
|
||||
};
|
||||
|
||||
enum class AudioInterpolation
|
||||
{
|
||||
None,
|
||||
Linear,
|
||||
Cosine,
|
||||
Cubic,
|
||||
};
|
||||
|
||||
class SPUChannel
|
||||
{
|
||||
public:
|
||||
SPUChannel(u32 num, melonDS::NDS& nds);
|
||||
SPUChannel(u32 num, melonDS::NDS& nds, AudioInterpolation interpolation);
|
||||
void Reset();
|
||||
void DoSavestate(Savestate* file);
|
||||
|
||||
@ -40,7 +55,7 @@ public:
|
||||
|
||||
// audio interpolation is an improvement upon the original hardware
|
||||
// (which performs no interpolation)
|
||||
int InterpType = 0;
|
||||
AudioInterpolation InterpType = AudioInterpolation::None;
|
||||
|
||||
const u32 Num;
|
||||
|
||||
@ -200,7 +215,7 @@ private:
|
||||
class SPU
|
||||
{
|
||||
public:
|
||||
explicit SPU(melonDS::NDS& nds);
|
||||
explicit SPU(melonDS::NDS& nds, AudioBitDepth bitdepth, AudioInterpolation interpolation);
|
||||
~SPU();
|
||||
void Reset();
|
||||
void DoSavestate(Savestate* file);
|
||||
@ -210,10 +225,11 @@ public:
|
||||
void SetPowerCnt(u32 val);
|
||||
|
||||
// 0=none 1=linear 2=cosine 3=cubic
|
||||
void SetInterpolation(int type);
|
||||
void SetInterpolation(AudioInterpolation type);
|
||||
|
||||
void SetBias(u16 bias);
|
||||
void SetDegrade10Bit(bool enable);
|
||||
void SetDegrade10Bit(AudioBitDepth depth);
|
||||
void SetApplyBias(bool enable);
|
||||
|
||||
void Mix(u32 dummy);
|
||||
|
Reference in New Issue
Block a user