GUI: prepare for a per-channel oscilloscope?

currently supported systems:
- Amiga
- AY-3-8910
- Dummy System
- OPLL
- SegaPCM

no trigger supported yet!
This commit is contained in:
tildearrow 2022-04-30 03:58:30 -05:00
parent ba657fe4db
commit 4197fa44fb
20 changed files with 269 additions and 14 deletions

View file

@ -21,6 +21,7 @@
#define _DISPATCH_H
#include <stdlib.h>
#include <string.h>
#include <vector>
#define ONE_SEMITONE 2200
@ -205,6 +206,18 @@ struct DivRegWrite {
addr(a), val(v) {}
};
struct DivDispatchOscBuffer {
unsigned int rate;
unsigned short needle;
short data[65536];
DivDispatchOscBuffer():
rate(65536),
needle(0) {
memset(data,0,65536*sizeof(short));
}
};
class DivEngine;
class DivMacroInt;
@ -268,6 +281,12 @@ class DivDispatch {
* @return a pointer, or NULL.
*/
virtual DivMacroInt* getChanMacroInt(int chan);
/**
* get an oscilloscope buffer for a channel.
* @return a pointer to a DivDispatchOscBuffer, or NULL if not supported.
*/
virtual DivDispatchOscBuffer* getOscBuffer(int chan);
/**
* get the register pool of this dispatch.