per-channel oscilloscope, part 3

K00/C64/NES fixed
FDS, Game Boy and Sound Unit
This commit is contained in:
tildearrow 2022-04-30 18:33:12 -05:00
parent 312a037816
commit 1c3dcae05e
11 changed files with 72 additions and 11 deletions

View file

@ -88,6 +88,12 @@ class SoundUnit {
bool muted[8];
void Write(unsigned char addr, unsigned char data);
void NextSample(short* l, short* r);
inline int GetSample(int ch) {
int ret=(nsL[ch]+nsR[ch])>>1;
if (ret<-32768) ret=-32768;
if (ret>32767) ret=32767;
return ret;
}
void Init();
void Reset();
SoundUnit();