Snes9x - Add the separate echo buffer option. (#836)

Snes9x
- Add the separate echo buffer option.
This commit is contained in:
bladeoner 2019-04-10 20:21:57 +02:00 committed by dborth
parent 246b28fcd5
commit 4e057ed7b4
4 changed files with 9 additions and 2 deletions

View File

@ -500,6 +500,7 @@ DefaultSettings ()
Settings.SoundPlaybackRate = 48000;
Settings.SoundInputRate = 31920;
Settings.DynamicRateControl = true;
Settings.SeparateEchoBuffer = false;
// Interpolation Method
GCSettings.Interpolation = 0;
@ -524,7 +525,7 @@ DefaultSettings ()
Settings.SuperFXSpeedPerLine = 5823405;
Settings.SuperFXClockMultiplier = 100;
Settings.OverclockMode = 0;
Settings.OneClockCycle = 6;
Settings.OneSlowClockCycle = 8;
Settings.TwoClockCycles = 12;

View File

@ -612,7 +612,7 @@ VOICE_CLOCK(V9_V6_V3) { voice_V9(v); voice_V6(v+1); voice_V3(v+2); }
//// Echo
// Current echo buffer pointer for left/right channel
#define ECHO_PTR( ch ) (&m.ram [m.t_echo_ptr + ch * 2])
#define ECHO_PTR( ch ) ((Settings.SeparateEchoBuffer) ? (&m.separate_echo_buffer [m.t_echo_ptr + ch * 2]) : (&m.ram [m.t_echo_ptr + ch * 2]))
// Sample in echo history buffer, where 0 is the oldest
#define ECHO_FIR( i ) (m.echo_hist_pos [i])
@ -881,6 +881,8 @@ void SPC_DSP::soft_reset_common()
m.echo_offset = 0;
m.phase = 0;
memset(m.separate_echo_buffer, 0, 0x10000);
init_counter();
for (int i = 0; i < voice_count; i++)

View File

@ -199,6 +199,8 @@ private:
sample_t* out_end;
sample_t* out_begin;
sample_t extra [extra_size];
uint8_t separate_echo_buffer [0x10000];
};
state_t m;

View File

@ -300,7 +300,9 @@ struct SSettings
bool8 OpenGLEnable;
float SuperFXSpeedPerLine;
bool8 SeparateEchoBuffer;
uint32 SuperFXClockMultiplier;
int OverclockMode;
int OneClockCycle;
int OneSlowClockCycle;
int TwoClockCycles;