per-channel oscilloscope, part 5
SAA1099 (SAASound and MAME), Lynx, MMC5, N163, PC Engine, PC Speaker, PET, QSound, WonderSwan, VERA, VIC-20, VRC6 and X1-010!
This commit is contained in:
parent
dadfd7efee
commit
c0e9b48b5b
47 changed files with 345 additions and 38 deletions
|
|
@ -274,6 +274,13 @@ void DivPlatformQSound::acquire(short* bufL, short* bufR, size_t start, size_t l
|
|||
qsound_update(&chip);
|
||||
bufL[h]=chip.out[0];
|
||||
bufR[h]=chip.out[1];
|
||||
|
||||
for (int i=0; i<19; i++) {
|
||||
int data=chip.voice_output[i]<<2;
|
||||
if (data<-32768) data=-32768;
|
||||
if (data>32767) data=32767;
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -546,6 +553,10 @@ void* DivPlatformQSound::getChanState(int ch) {
|
|||
return &chan[ch];
|
||||
}
|
||||
|
||||
DivDispatchOscBuffer* DivPlatformQSound::getOscBuffer(int ch) {
|
||||
return oscBuf[ch];
|
||||
}
|
||||
|
||||
void DivPlatformQSound::reset() {
|
||||
for (int i=0; i<16; i++) {
|
||||
chan[i]=DivPlatformQSound::Channel();
|
||||
|
|
@ -632,9 +643,10 @@ int DivPlatformQSound::init(DivEngine* p, int channels, int sugRate, unsigned in
|
|||
dumpWrites=false;
|
||||
skipRegisterWrites=false;
|
||||
|
||||
//for (int i=0; i<16; i++) {
|
||||
// isMuted[i]=false;
|
||||
//}
|
||||
for (int i=0; i<19; i++) {
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
//isMuted[i]=false;
|
||||
}
|
||||
setFlags(flags);
|
||||
|
||||
chipClock=60000000;
|
||||
|
|
@ -642,8 +654,15 @@ int DivPlatformQSound::init(DivEngine* p, int channels, int sugRate, unsigned in
|
|||
chip.rom_data = (unsigned char*)&chip.rom_mask;
|
||||
chip.rom_mask = 0;
|
||||
reset();
|
||||
|
||||
for (int i=0; i<19; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
return 19;
|
||||
}
|
||||
|
||||
void DivPlatformQSound::quit() {
|
||||
for (int i=0; i<19; i++) {
|
||||
delete oscBuf[i];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue