SAA1099: fix output being static

this caused problems with multi-SAA songs
This commit is contained in:
tildearrow 2022-11-15 03:20:07 -05:00
parent 319d02aec6
commit a541183792
2 changed files with 4 additions and 2 deletions

View File

@ -26,7 +26,9 @@ m_uParamRate(0),
m_nClockRate(EXTERNAL_CLK_HZ),
m_nSampleRate(SAMPLE_RATE_HZ),
m_nOversample(DEFAULT_OVERSAMPLE),
m_bHighpass(false)
m_bHighpass(false),
filterout_z1_left_mixed(0),
filterout_z1_right_mixed(0)
{
#ifdef USE_CONFIG_FILE
m_Config.ReadConfig();
@ -301,7 +303,6 @@ void scale_for_output(unsigned int left_input, unsigned int right_input,
void CSAASoundInternal::GenerateMany(BYTE* pBuffer, unsigned long nSamples, DivDispatchOscBuffer** oscBuf)
{
unsigned int left_mixed, right_mixed;
static double filterout_z1_left_mixed = 0, filterout_z1_right_mixed = 0;
#if defined(DEBUGSAA) || defined(USE_CONFIG_FILE)
BYTE* pBufferStart = pBuffer;

View File

@ -36,6 +36,7 @@ private:
unsigned int m_nSampleRate;
unsigned int m_nOversample;
bool m_bHighpass;
double filterout_z1_left_mixed, filterout_z1_right_mixed;
#ifdef USE_CONFIG_FILE
SAAConfig m_Config;
#endif