parent
8d4d47950c
commit
6d9f5db6a4
21 changed files with 155 additions and 44 deletions
|
|
@ -215,6 +215,11 @@ class DivDispatch {
|
|||
*/
|
||||
void setSkipRegisterWrites(bool value);
|
||||
|
||||
/**
|
||||
* notify instrument change.
|
||||
*/
|
||||
virtual void notifyInsChange(int ins);
|
||||
|
||||
/**
|
||||
* notify deletion of an instrument.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2206,6 +2206,14 @@ bool DivEngine::haltAudioFile() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void DivEngine::notifyInsChange(int ins) {
|
||||
isBusy.lock();
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
disCont[i].dispatch->notifyInsChange(ins);
|
||||
}
|
||||
isBusy.unlock();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define CONFIG_FILE "\\furnace.cfg"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -219,6 +219,8 @@ class DivEngine {
|
|||
void waitAudioFile();
|
||||
// stop audio file export
|
||||
bool haltAudioFile();
|
||||
// notify instrument parameter change
|
||||
void notifyInsChange(int ins);
|
||||
|
||||
// save config
|
||||
bool saveConf();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ void DivDispatch::setSkipRegisterWrites(bool value) {
|
|||
skipRegisterWrites=value;
|
||||
}
|
||||
|
||||
void DivDispatch::notifyInsChange(int ins) {
|
||||
|
||||
}
|
||||
|
||||
void DivDispatch::notifyInsDeletion(void* ins) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,6 +211,14 @@ bool DivPlatformAmiga::keyOffAffectsArp(int ch) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void DivPlatformAmiga::notifyInsChange(int ins) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (chan[i].ins==ins) {
|
||||
chan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformAmiga::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class DivPlatformAmiga: public DivDispatch {
|
|||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void setPAL(bool pal);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -430,6 +430,14 @@ void DivPlatformArcade::forceIns() {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformArcade::notifyInsChange(int ins) {
|
||||
for (int i=0; i<8; i++) {
|
||||
if (chan[i].ins==ins) {
|
||||
chan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformArcade::reset() {
|
||||
while (!writes.empty()) writes.pop();
|
||||
if (useYMFM) {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ class DivPlatformArcade: public DivDispatch {
|
|||
void forceIns();
|
||||
void tick();
|
||||
void muteChannel(int ch, bool mute);
|
||||
void notifyInsChange(int ins);
|
||||
bool isStereo();
|
||||
void setYMFM(bool use);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
|
|
|
|||
|
|
@ -311,6 +311,14 @@ void DivPlatformC64::forceIns() {
|
|||
updateFilter();
|
||||
}
|
||||
|
||||
void DivPlatformC64::notifyInsChange(int ins) {
|
||||
for (int i=0; i<3; i++) {
|
||||
if (chan[i].ins==ins) {
|
||||
chan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformC64::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<3; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ class DivPlatformC64: public DivDispatch {
|
|||
void tick();
|
||||
void muteChannel(int ch, bool mute);
|
||||
void setPAL(bool pal);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void setChipModel(bool is6581);
|
||||
|
|
|
|||
|
|
@ -316,6 +316,14 @@ bool DivPlatformGB::isStereo() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void DivPlatformGB::notifyInsChange(int ins) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (chan[i].ins==ins) {
|
||||
chan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformGB::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class DivPlatformGB: public DivDispatch {
|
|||
void tick();
|
||||
void muteChannel(int ch, bool mute);
|
||||
bool isStereo();
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -423,6 +423,16 @@ bool DivPlatformGenesis::keyOffAffectsPorta(int ch) {
|
|||
return (ch>5);
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::notifyInsChange(int ins) {
|
||||
for (int i=0; i<10; i++) {
|
||||
if (i>5) {
|
||||
psg.notifyInsChange(ins);
|
||||
} else if (chan[i].ins==ins) {
|
||||
chan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformGenesis::notifyInsDeletion(void* ins) {
|
||||
psg.notifyInsDeletion(ins);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class DivPlatformGenesis: public DivDispatch {
|
|||
bool keyOffAffectsArp(int ch);
|
||||
bool keyOffAffectsPorta(int ch);
|
||||
void setPAL(bool pal);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -310,6 +310,15 @@ bool DivPlatformGenesisExt::keyOffAffectsPorta(int ch) {
|
|||
return (ch>8);
|
||||
}
|
||||
|
||||
void DivPlatformGenesisExt::notifyInsChange(int ins) {
|
||||
DivPlatformGenesis::notifyInsChange(ins);
|
||||
for (int i=0; i<4; i++) {
|
||||
if (opChan[i].ins==ins) {
|
||||
opChan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformGenesisExt::init(DivEngine* parent, int channels, int sugRate, bool pal) {
|
||||
DivPlatformGenesis::init(parent,channels,sugRate,pal);
|
||||
for (int i=0; i<4; i++) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class DivPlatformGenesisExt: public DivPlatformGenesis {
|
|||
void muteChannel(int ch, bool mute);
|
||||
bool keyOffAffectsArp(int ch);
|
||||
bool keyOffAffectsPorta(int ch);
|
||||
void notifyInsChange(int ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
~DivPlatformGenesisExt();
|
||||
|
|
|
|||
|
|
@ -592,6 +592,14 @@ bool DivPlatformYM2610::keyOffAffectsArp(int ch) {
|
|||
return (ch>3);
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::notifyInsChange(int ins) {
|
||||
for (int i=0; i<13; i++) {
|
||||
if (chan[i].ins==ins) {
|
||||
chan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::notifyInsDeletion(void* ins) {
|
||||
for (int i=4; i<7; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ class DivPlatformYM2610: public DivDispatch {
|
|||
void muteChannel(int ch, bool mute);
|
||||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -285,6 +285,15 @@ bool DivPlatformYM2610Ext::keyOffAffectsArp(int ch) {
|
|||
return (ch>7);
|
||||
}
|
||||
|
||||
void DivPlatformYM2610Ext::notifyInsChange(int ins) {
|
||||
DivPlatformYM2610::notifyInsChange(ins);
|
||||
for (int i=0; i<4; i++) {
|
||||
if (opChan[i].ins==ins) {
|
||||
opChan[i].insChanged=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformYM2610Ext::init(DivEngine* parent, int channels, int sugRate, bool pal) {
|
||||
DivPlatformYM2610::init(parent,channels,sugRate,pal);
|
||||
for (int i=0; i<4; i++) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ class DivPlatformYM2610Ext: public DivPlatformYM2610 {
|
|||
void tick();
|
||||
void muteChannel(int ch, bool mute);
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void notifyInsChange(int ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
~DivPlatformYM2610Ext();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue