From 28d7c72373bab280711bae1a64f264e66ca924dc Mon Sep 17 00:00:00 2001 From: Louis <35883445+louist103@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:21:31 -0400 Subject: [PATCH] Fix binary for V2 --- OTRExporter/AudioExporter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OTRExporter/AudioExporter.cpp b/OTRExporter/AudioExporter.cpp index adba64a..d8f8296 100644 --- a/OTRExporter/AudioExporter.cpp +++ b/OTRExporter/AudioExporter.cpp @@ -94,6 +94,8 @@ void OTRExporter_Audio::WriteSoundFontEntry(ZAudio* audio, SoundFontEntry* entry if (entry != nullptr) { + // This second byte isn't used but is needed to maintain compatibility with the V2 format. + writer->Write((uint8_t)(entry != nullptr ? 1 : 0)); writer->Write(GetSampleEntryReference(audio, entry->sampleEntry, samples)); writer->Write(entry->tuning); } @@ -363,8 +365,8 @@ void OTRExporter_Audio::Save(ZResource* res, const fs::path& outPath, BinaryWrit } // Write the soundfont table - WriteSoundFontTableXML(audio); + WriteSoundFontTableBinary(audio); // Write Sequences - WriteSequenceXML(audio); + WriteSequenceBinary(audio); }