WaveSynth: initialize wave to 0 on SCC/Bubble Syst
This commit is contained in:
parent
eac4f50d92
commit
dd05429c0e
|
@ -306,7 +306,7 @@ void DivPlatformBubSysWSG::reset() {
|
||||||
for (int i=0; i<2; i++) {
|
for (int i=0; i<2; i++) {
|
||||||
chan[i]=DivPlatformBubSysWSG::Channel();
|
chan[i]=DivPlatformBubSysWSG::Channel();
|
||||||
chan[i].std.setEngine(parent);
|
chan[i].std.setEngine(parent);
|
||||||
chan[i].ws.setEngine(parent);
|
chan[i].ws.setEngine(parent,8);
|
||||||
chan[i].ws.init(NULL,32,15,false);
|
chan[i].ws.init(NULL,32,15,false);
|
||||||
}
|
}
|
||||||
if (dumpWrites) {
|
if (dumpWrites) {
|
||||||
|
|
|
@ -332,7 +332,7 @@ void DivPlatformSCC::reset() {
|
||||||
for (int i=0; i<5; i++) {
|
for (int i=0; i<5; i++) {
|
||||||
chan[i]=DivPlatformSCC::Channel();
|
chan[i]=DivPlatformSCC::Channel();
|
||||||
chan[i].std.setEngine(parent);
|
chan[i].std.setEngine(parent);
|
||||||
chan[i].ws.setEngine(parent);
|
chan[i].ws.setEngine(parent,128);
|
||||||
chan[i].ws.init(NULL,32,255,false);
|
chan[i].ws.init(NULL,32,255,false);
|
||||||
chan[i].vol=15;
|
chan[i].vol=15;
|
||||||
chan[i].outVol=15;
|
chan[i].outVol=15;
|
||||||
|
|
|
@ -243,8 +243,13 @@ void DivWaveSynth::changeWave2(int num) {
|
||||||
first=true;
|
first=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivWaveSynth::setEngine(DivEngine* engine) {
|
void DivWaveSynth::setEngine(DivEngine* engine, int waveFloor) {
|
||||||
e=engine;
|
e=engine;
|
||||||
|
memset(wave1,waveFloor,256);
|
||||||
|
memset(wave2,waveFloor,256);
|
||||||
|
for (int i=0; i<256; i++) {
|
||||||
|
output[i]=waveFloor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivWaveSynth::init(DivInstrument* which, int w, int h, bool insChanged) {
|
void DivWaveSynth::init(DivInstrument* which, int w, int h, bool insChanged) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ class DivWaveSynth {
|
||||||
* @param insChanged whether the instrument has changed.
|
* @param insChanged whether the instrument has changed.
|
||||||
*/
|
*/
|
||||||
void init(DivInstrument* which, int width, int height, bool insChanged=false);
|
void init(DivInstrument* which, int width, int height, bool insChanged=false);
|
||||||
void setEngine(DivEngine* engine);
|
void setEngine(DivEngine* engine, int waveFloor=0);
|
||||||
DivWaveSynth():
|
DivWaveSynth():
|
||||||
e(NULL),
|
e(NULL),
|
||||||
pos(0),
|
pos(0),
|
||||||
|
|
Loading…
Reference in a new issue