From e07916487d8ee8745cfaace6cd1e1493295afb6e Mon Sep 17 00:00:00 2001 From: David Racine Date: Sat, 3 Oct 2026 09:50:08 -0400 Subject: [PATCH] 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 --- soh/soh/resource/importer/AudioSequenceFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/resource/importer/AudioSequenceFactory.cpp b/soh/soh/resource/importer/AudioSequenceFactory.cpp index 118f302eda..ff91e9de17 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(writer->GetBaseAddress()); WriteNoshort(writer); + layerPlaceholderOff = static_cast(writer->GetBaseAddress()); WriteLdlayer(writer, 0, 0); WritePan(writer, 64); WriteVolCHeader(writer, 127); // Max volume