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 DivInstrument::putInsData(SafeWriter* w) {
|
||||
size_t blockStartSeek, blockEndSeek;
|
||||
|
||||
w->write("INST",4);
|
||||
blockStartSeek=w->tell();
|
||||
w->writeI(0);
|
||||
|
||||
w->writeS(DIV_ENGINE_VERSION);
|
||||
|
|
@ -520,6 +523,11 @@ void DivInstrument::putInsData(SafeWriter* w) {
|
|||
for (int j=0; j<23; j++) { // reserved
|
||||
w->writeC(0);
|
||||
}
|
||||
|
||||
blockEndSeek=w->tell();
|
||||
w->seek(blockStartSeek,SEEK_SET);
|
||||
w->writeI(blockEndSeek-blockStartSeek-4);
|
||||
w->seek(0,SEEK_END);
|
||||
}
|
||||
|
||||
DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue