Save the size of each block in a Furnace module
This commit is contained in:
parent
f61a114637
commit
5378974b96
4 changed files with 47 additions and 7 deletions
|
|
@ -24,7 +24,10 @@
|
|||
#include "../fileutils.h"
|
||||
|
||||
void DivWavetable::putWaveData(SafeWriter* w) {
|
||||
size_t blockStartSeek, blockEndSeek;
|
||||
|
||||
w->write("WAVE",4);
|
||||
blockStartSeek=w->tell();
|
||||
w->writeI(0);
|
||||
|
||||
w->writeC(0); // name
|
||||
|
|
@ -34,6 +37,11 @@ void DivWavetable::putWaveData(SafeWriter* w) {
|
|||
for (int j=0; j<len; j++) {
|
||||
w->writeI(data[j]);
|
||||
}
|
||||
|
||||
blockEndSeek=w->tell();
|
||||
w->seek(blockStartSeek,SEEK_SET);
|
||||
w->writeI(blockEndSeek-blockStartSeek-4);
|
||||
w->seek(0,SEEK_END);
|
||||
}
|
||||
|
||||
DivDataErrors DivWavetable::readWaveData(SafeReader& reader, short version) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue