GUI: prepare for more UX improvements

- add "temporary instrument" to DivEngine
- prepare for two things:
  - instrument preview on file picker (at least built-in one)
  - instrument selector for banks (#364)
This commit is contained in:
tildearrow 2022-04-25 18:23:12 -05:00
parent 2e52a2855c
commit b3f1935f2b
3 changed files with 16 additions and 1 deletions

View file

@ -302,6 +302,7 @@ class DivEngine {
public:
DivSong song;
DivInstrument* tempIns;
DivSystem sysOfChan[DIV_MAX_CHANS];
int dispatchOfChan[DIV_MAX_CHANS];
int dispatchChanOfChan[DIV_MAX_CHANS];
@ -525,6 +526,9 @@ class DivEngine {
// if the returned vector is empty then there was an error.
std::vector<DivInstrument*> instrumentFromFile(const char* path);
// load temporary instrument
void loadTempIns(DivInstrument* which);
// delete instrument
void delInstrument(int index);
@ -798,6 +802,7 @@ class DivEngine {
metroAmp(0.0f),
metroVol(1.0f),
totalProcessed(0),
tempIns(NULL),
oscBuf{NULL,NULL},
oscSize(1),
oscReadPos(0),