parent
af30d4990a
commit
345962092e
11 changed files with 49 additions and 0 deletions
|
|
@ -220,6 +220,11 @@ class DivDispatch {
|
|||
*/
|
||||
virtual void notifyInsChange(int ins);
|
||||
|
||||
/**
|
||||
* notify wavetable change.
|
||||
*/
|
||||
virtual void notifyWaveChange(int wave);
|
||||
|
||||
/**
|
||||
* notify deletion of an instrument.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2214,6 +2214,14 @@ void DivEngine::notifyInsChange(int ins) {
|
|||
isBusy.unlock();
|
||||
}
|
||||
|
||||
void DivEngine::notifyWaveChange(int wave) {
|
||||
isBusy.lock();
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
disCont[i].dispatch->notifyWaveChange(wave);
|
||||
}
|
||||
isBusy.unlock();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define CONFIG_FILE "\\furnace.cfg"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -221,6 +221,8 @@ class DivEngine {
|
|||
bool haltAudioFile();
|
||||
// notify instrument parameter change
|
||||
void notifyInsChange(int ins);
|
||||
// notify wavetable change
|
||||
void notifyWaveChange(int wave);
|
||||
|
||||
// save config
|
||||
bool saveConf();
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@ void DivDispatch::notifyInsChange(int ins) {
|
|||
|
||||
}
|
||||
|
||||
void DivDispatch::notifyWaveChange(int ins) {
|
||||
|
||||
}
|
||||
|
||||
void DivDispatch::notifyInsDeletion(void* ins) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,10 @@ void DivPlatformAmiga::notifyInsChange(int ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformAmiga::notifyWaveChange(int wave) {
|
||||
// TODO when wavetables are added
|
||||
}
|
||||
|
||||
void DivPlatformAmiga::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ class DivPlatformAmiga: public DivDispatch {
|
|||
bool keyOffAffectsArp(int ch);
|
||||
void setPAL(bool pal);
|
||||
void notifyInsChange(int ins);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -324,6 +324,13 @@ void DivPlatformGB::notifyInsChange(int ins) {
|
|||
}
|
||||
}
|
||||
|
||||
void DivPlatformGB::notifyWaveChange(int wave) {
|
||||
if (chan[2].wave==wave) {
|
||||
updateWave();
|
||||
if (!chan[2].keyOff) chan[2].keyOn=true;
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformGB::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class DivPlatformGB: public DivDispatch {
|
|||
void muteChannel(int ch, bool mute);
|
||||
bool isStereo();
|
||||
void notifyInsChange(int ins);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -313,6 +313,14 @@ bool DivPlatformPCE::keyOffAffectsArp(int ch) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void DivPlatformPCE::notifyWaveChange(int wave) {
|
||||
for (int i=0; i<6; i++) {
|
||||
if (chan[i].wave==wave) {
|
||||
updateWave(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformPCE::notifyInsDeletion(void* ins) {
|
||||
for (int i=0; i<6; i++) {
|
||||
chan[i].std.notifyInsDeletion((DivInstrument*)ins);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
void setPAL(bool pal);
|
||||
void notifyWaveChange(int wave);
|
||||
void notifyInsDeletion(void* ins);
|
||||
int init(DivEngine* parent, int channels, int sugRate, bool pal);
|
||||
void quit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue