Merge pull request #75 from jpcima/sbi
Make the instrument format more compliant to SBI
This commit is contained in:
commit
7fa99fa8fa
1 changed files with 3 additions and 2 deletions
|
@ -552,13 +552,14 @@ void AdlibBlasterAudioProcessor::saveInstrumentToFile(String filename)
|
|||
};
|
||||
FILE* f = fopen(filename.toUTF8(), "wb");
|
||||
if (f) {
|
||||
fwrite("SBI\x1d", 1, 4, f);
|
||||
fwrite("SBI\x1a", 1, 4, f);
|
||||
fwrite("JuceOPLVSTi instrument \0", 1, 32, f);
|
||||
for (int i = 0; i < 11; i++) {
|
||||
Bit8u regVal = Opl->_ReadReg(sbi_registers[i]);
|
||||
fwrite(®Val, 1, 1, f);
|
||||
}
|
||||
fwrite(" ", 1, 5, f);
|
||||
char padding[5] = { 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
fwrite(padding, 1, 5, f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue