audio: added SSG-EG to YM2612, plus some timing changes for SN76496+YM2612

This commit is contained in:
kub 2020-01-08 00:49:13 +01:00
parent 2a942f0d41
commit 8ac9ab7fcb
13 changed files with 571 additions and 455 deletions

View file

@ -12,16 +12,15 @@
#define MINOUT (-32768)
/* limitter */
#define Limit16(val) { \
val -= (val >> 2); \
if ((short)val != val) val = (val < 0 ? MINOUT : MAXOUT); \
}
#define Limit16(val) \
if ((short)val != val) val = (val < 0 ? MINOUT : MAXOUT)
int mix_32_to_16l_level;
static struct iir2 { // 2-pole IIR
int x[2]; // sample buffer
int y[2]; // filter intermediates
int i;
} lfi2, rfi2;
// NB ">>" rounds to -infinity, "/" to 0. To compensate the effect possibly use