parent
0c1e2ddcb0
commit
5bd076d13e
9 changed files with 162 additions and 72 deletions
|
|
@ -29,16 +29,41 @@ class DivWaveSynth {
|
|||
DivEngine* e;
|
||||
DivInstrumentWaveSynth state;
|
||||
int pos, stage, divCounter, width, height;
|
||||
bool first;
|
||||
bool first, activeChangedB;
|
||||
unsigned char wave1[256];
|
||||
unsigned char wave2[256];
|
||||
int output[256];
|
||||
public:
|
||||
/**
|
||||
* the output.
|
||||
*/
|
||||
int output[256];
|
||||
/**
|
||||
* check whether the "active" status has changed.
|
||||
* @return truth.
|
||||
*/
|
||||
bool activeChanged();
|
||||
/**
|
||||
* tick this DivWaveSynth.
|
||||
* @return whether the wave has changed.
|
||||
*/
|
||||
bool tick();
|
||||
/**
|
||||
* change the first wave.
|
||||
* @param num wavetable number.
|
||||
*/
|
||||
void changeWave1(int num);
|
||||
/**
|
||||
* change the second wave.
|
||||
* @param num wavetable number.
|
||||
*/
|
||||
void changeWave2(int num);
|
||||
/**
|
||||
* initialize this DivWaveSynth.
|
||||
* @param which the instrument.
|
||||
* @param width the system's wave width.
|
||||
* @param height the system's wave height.
|
||||
* @param insChanged whether the instrument has changed.
|
||||
*/
|
||||
void init(DivInstrument* which, int width, int height, bool insChanged=false);
|
||||
void setEngine(DivEngine* engine);
|
||||
DivWaveSynth():
|
||||
|
|
@ -48,7 +73,8 @@ class DivWaveSynth {
|
|||
divCounter(0),
|
||||
width(32),
|
||||
height(31),
|
||||
first(false) {
|
||||
first(false),
|
||||
activeChangedB(false) {
|
||||
memset(wave1,0,sizeof(int)*256);
|
||||
memset(wave2,0,sizeof(int)*256);
|
||||
memset(output,0,sizeof(int)*256);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue