add wavetable saving

This commit is contained in:
tildearrow 2022-01-19 05:10:06 -05:00
parent 7c40948680
commit 62a499644f
4 changed files with 62 additions and 22 deletions

View file

@ -1719,16 +1719,7 @@ SafeWriter* DivEngine::saveFur() {
for (int i=0; i<song.waveLen; i++) {
DivWavetable* wave=song.wave[i];
wavePtr[i]=w->tell();
w->write("WAVE",4);
w->writeI(0);
w->writeC(0); // name
w->writeI(wave->len);
w->writeI(wave->min);
w->writeI(wave->max);
for (int j=0; j<wave->len; j++) {
w->writeI(wave->data[j]);
}
wave->putWaveData(w);
}
/// SAMPLE