summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Racine <bass_dr@hotmail.com>2026-10-03 09:50:08 -0400
committerGitHub <noreply@github.com>2026-10-03 13:50:08 +0000
commite07916487d8ee8745cfaace6cd1e1493295afb6e (patch)
treeb266eac38a496e43bbafc568480de5b56afb4547
parent69a7cdb1792e9b84c693d2ee5434da14d6942eba (diff)
AudioSequenceFactory: fix mono streamed tracks not playing (#7291)
In WriteMonoSingleSeq, layerPlaceholderOff was recorded before WriteNoshort, causing a stray 0x00 byte to be emitted into the mono channel script. The 0x00 decoded as a delay of 0 ticks, which deferred the subsequent ldlayer byte by one tick and left channel->instrument unset when the layer first processed its note, producing no sound. Move layerPlaceholderOff to after WriteNoshort so the placeholder writes the correct address, matching WriteStereoSingleSeq. Fixes #7264
-rw-r--r--soh/soh/resource/importer/AudioSequenceFactory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/soh/soh/resource/importer/AudioSequenceFactory.cpp b/soh/soh/resource/importer/AudioSequenceFactory.cpp
index 118f302ed..ff91e9de1 100644
--- a/soh/soh/resource/importer/AudioSequenceFactory.cpp
+++ b/soh/soh/resource/importer/AudioSequenceFactory.cpp
@@ -201,8 +201,8 @@ static void WriteMonoSingleSeq(Ship::BinaryWriter* writer, uint16_t delay, uint8
writer->Seek(channelStart, Ship::SeekOffsetType::Start);
// Channel header
- layerPlaceholderOff = static_cast<uint16_t>(writer->GetBaseAddress());
WriteNoshort(writer);
+ layerPlaceholderOff = static_cast<uint16_t>(writer->GetBaseAddress());
WriteLdlayer(writer, 0, 0);
WritePan(writer, 64);
WriteVolCHeader(writer, 127); // Max volume