Add the separate echo buffer option.

This commit is contained in:
Brandon Wright 2019-04-08 17:16:24 -05:00
parent 3c879cc2b3
commit 6a789f9947
3 changed files with 7 additions and 3 deletions

View File

@ -959,7 +959,7 @@ VOICE_CLOCK(V9_V6_V3) { voice_V9(v); voice_V6(v+1); voice_V3(v+2); }
//// Echo //// Echo
// Current echo buffer pointer for left/right channel // 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 // Sample in echo history buffer, where 0 is the oldest
#define ECHO_FIR( i ) (m.echo_hist_pos [i]) #define ECHO_FIR( i ) (m.echo_hist_pos [i])
@ -1221,6 +1221,8 @@ void SPC_DSP::soft_reset_common()
m.echo_offset = 0; m.echo_offset = 0;
m.phase = 0; m.phase = 0;
memset(m.separate_echo_buffer, 0, 0x10000);
init_counter(); init_counter();
for (int i = 0; i < voice_count; i++) for (int i = 0; i < voice_count; i++)

View File

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

View File

@ -5109,8 +5109,8 @@ INT_PTR CALLBACK DlgEmulatorHacksProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
switch (LOWORD(wParam)) switch (LOWORD(wParam))
{ {
case IDOK: case IDOK:
if ((!Settings.BlockInvalidVRAMAccessMaster == IsDlgButtonChecked(hDlg, IDC_INVALID_VRAM) || if (((Settings.BlockInvalidVRAMAccessMaster != !IsDlgButtonChecked(hDlg, IDC_INVALID_VRAM)) ||
Settings.SeparateEchoBuffer != IsDlgButtonChecked(hDlg, IDC_SEPARATE_ECHO_BUFFER)) (Settings.SeparateEchoBuffer != IsDlgButtonChecked(hDlg, IDC_SEPARATE_ECHO_BUFFER)))
&& !Settings.StopEmulation) && !Settings.StopEmulation)
{ {