<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Shipwright/soh/src/code/audio_load.c, branch develop</title>
<subtitle>Ship of Harkinian: Ocarina of Time PC port</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/'/>
<entry>
<title>fix(audio): bounds-check fontId to stop OOB crash with large SAF packs (#6916)</title>
<updated>2026-07-13T12:12:43+00:00</updated>
<author>
<name>David Racine</name>
<email>bass_dr@hotmail.com</email>
</author>
<published>2026-07-13T12:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=fdb7e194cca951888326d67a5537336afa8acf8c'/>
<id>fdb7e194cca951888326d67a5537336afa8acf8c</id>
<content type='text'>
AudioLoad_IsFontLoadComplete had a stub `return true` that bypassed all
load-status checks, masking an out-of-bounds write: for large SAF packs
(many custom sequences) SetFontLoadStatus indexed fontLoadStatus[] with
fontId values larger than the fontMapSize-sized array, causing heap
corruption and semi-random crashes.

Remove the stub. Add a (size_t)fontId &gt;= fontMapSize guard in both the
check and the setter: out-of-range IDs (custom SAF sequences that carry
no associated soundfont) are treated as "loaded" in the check and
silently skipped in the write, matching prior observable behavior while
eliminating the OOB access.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AudioLoad_IsFontLoadComplete had a stub `return true` that bypassed all
load-status checks, masking an out-of-bounds write: for large SAF packs
(many custom sequences) SetFontLoadStatus indexed fontLoadStatus[] with
fontId values larger than the fontMapSize-sized array, causing heap
corruption and semi-random crashes.

Remove the stub. Add a (size_t)fontId &gt;= fontMapSize guard in both the
check and the setter: out-of-range IDs (custom SAF sequences that carry
no associated soundfont) are treated as "loaded" in the check and
silently skipped in the write, matching prior observable behavior while
eliminating the OOB access.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup unused includes &amp; remove remaining LUS umbrella includes (#6813)</title>
<updated>2026-06-27T00:20:03+00:00</updated>
<author>
<name>Tim Schneeberger</name>
<email>tim.schneeberger@outlook.de</email>
</author>
<published>2026-06-27T00:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=633e92096964ce036e7c18426c98a4835e1aace5'/>
<id>633e92096964ce036e7c18426c98a4835e1aace5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(audio): replace stray custom-sequence printf with a debug log (#6752)</title>
<updated>2026-06-18T13:29:45+00:00</updated>
<author>
<name>David Racine</name>
<email>bass_dr@hotmail.com</email>
</author>
<published>2026-06-18T13:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=ebdd2c34c7abccba8686a6e06741d60911cb2558'/>
<id>ebdd2c34c7abccba8686a6e06741d60911cb2558</id>
<content type='text'>
The custom-sequence registration loop printed each assigned seqNum to
stdout via a bare printf, spamming the console with context-free numbers
on every launch. Convert it to LUSLOG_DEBUG and include the sequence name
so it is hidden by default yet useful for diagnosing music-pack loading.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The custom-sequence registration loop printed each assigned seqNum to
stdout via a bare printf, spamming the console with context-free numbers
on every launch. Convert it to LUSLOG_DEBUG and include the sequence name
so it is hidden by default yet useful for diagnosing music-pack loading.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix custom music corruption past 256 sequences (#5989) (#6736)</title>
<updated>2026-06-13T03:36:25+00:00</updated>
<author>
<name>David Racine</name>
<email>bass_dr@hotmail.com</email>
</author>
<published>2026-06-13T03:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=eb4142835eba466852cdf8d588f548a5c6d7c9fe'/>
<id>eb4142835eba466852cdf8d588f548a5c6d7c9fe</id>
<content type='text'>
The resolved replacement id (which can exceed 255) rode a single
per-player seqToPlay slot, written at enqueue but consumed
asynchronously on the audio thread; back-to-back starts and
priority-queue promotions clobbered it. sSeqFlags[0x6F] was also indexed
by raw id, reading out of bounds past the authentic range.

- func_800F9280 resolves the replacement and packs the full 16-bit id
  into the 0x82/0x85 play command; the handler reads opArgs &amp; 0xFFFF.
  Audio_QueueSeqCmd no longer pre-writes the shared slot.
- SyncInitSeqPlayerInternal uses the command-carried id and bounds-checks
  it against the calloc'd sequence map (+0xF headroom for reserved-range
  skips).
- Route sSeqFlags reads through a bounded Audio_GetSeqFlags helper.
- Warn and skip gracefully past the 16-bit id limit.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The resolved replacement id (which can exceed 255) rode a single
per-player seqToPlay slot, written at enqueue but consumed
asynchronously on the audio thread; back-to-back starts and
priority-queue promotions clobbered it. sSeqFlags[0x6F] was also indexed
by raw id, reading out of bounds past the authentic range.

- func_800F9280 resolves the replacement and packs the full 16-bit id
  into the 0x82/0x85 play command; the handler reads opArgs &amp; 0xFFFF.
  Audio_QueueSeqCmd no longer pre-writes the shared slot.
- SyncInitSeqPlayerInternal uses the command-carried id and bounds-checks
  it against the calloc'd sequence map (+0xF headroom for reserved-range
  skips).
- Route sSeqFlags reads through a bounded Audio_GetSeqFlags helper.
- Warn and skip gracefully past the 16-bit id limit.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Fix undefined behavior (#6089)</title>
<updated>2026-01-10T21:31:21+00:00</updated>
<author>
<name>Paul Schwabauer</name>
<email>github@schwabauer.co</email>
</author>
<published>2026-01-10T21:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=cd8bd69c6e65c185e757133bcf67ff82ce7cf748'/>
<id>cd8bd69c6e65c185e757133bcf67ff82ce7cf748</id>
<content type='text'>
Fix TimeSplit crash on empty name

Initialize OptionValue::mVal to fix undefined behavior

Fix undefined behavior in GraveHoleJumps surface type copy.
The memcpy was reading 33 SurfaceTypes regardless of the actual count,
causing a buffer overread since NTSC 1.0 only has 31 surface types and
later versions have 32. Now uses the actual surfaceTypesCount from the
collision header.

Fix undefined behavior in framebuffer OTR signature check.
Use calloc instead of malloc for framebuffer allocation to zero-initialize
the memory. This fixes Valgrind warnings about reading uninitialized values
when ResourceMgr_OTRSigCheck reads from framebuffer pointers to check for
the "__OTR__" signature.

Fix undefined behavior in fontLoadStatus initialization.
Use calloc instead of malloc when allocating fontLoadStatus array
to ensure zero-initialization. This fixes Valgrind warnings about
conditional jumps depending on uninitialized values in
AudioLoad_SetFontLoadStatus.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix TimeSplit crash on empty name

Initialize OptionValue::mVal to fix undefined behavior

Fix undefined behavior in GraveHoleJumps surface type copy.
The memcpy was reading 33 SurfaceTypes regardless of the actual count,
causing a buffer overread since NTSC 1.0 only has 31 surface types and
later versions have 32. Now uses the actual surfaceTypesCount from the
collision header.

Fix undefined behavior in framebuffer OTR signature check.
Use calloc instead of malloc for framebuffer allocation to zero-initialize
the memory. This fixes Valgrind warnings about reading uninitialized values
when ResourceMgr_OTRSigCheck reads from framebuffer pointers to check for
the "__OTR__" signature.

Fix undefined behavior in fontLoadStatus initialization.
Use calloc instead of malloc when allocating fontLoadStatus array
to ensure zero-initialization. This fixes Valgrind warnings about
conditional jumps depending on uninitialized values in
AudioLoad_SetFontLoadStatus.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leaks in MessageViewer and audio_load (#6124)</title>
<updated>2026-01-10T12:53:37+00:00</updated>
<author>
<name>Paul Schwabauer</name>
<email>github@schwabauer.co</email>
</author>
<published>2026-01-10T12:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=5bbc32c2d1443390dc4415d62f89fab234f42a81'/>
<id>5bbc32c2d1443390dc4415d62f89fab234f42a81</id>
<content type='text'>
Add destructor to MessageViewer to free allocated buffers

Free individual strings from ResourceMgr_ListFiles before freeing the array in audio_load.c</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add destructor to MessageViewer to free allocated buffers

Free individual strings from ResourceMgr_ListFiles before freeing the array in audio_load.c</pre>
</div>
</content>
</entry>
<entry>
<title>sequence notifs (updated #5265) (#5824)</title>
<updated>2025-10-05T01:57:01+00:00</updated>
<author>
<name>briaguya</name>
<email>70942617+briaguya0@users.noreply.github.com</email>
</author>
<published>2025-10-05T01:57:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=dd2628f737d12f32accc030c44d1572ecd97d12c'/>
<id>dd2628f737d12f32accc030c44d1572ecd97d12c</id>
<content type='text'>
* Adds ability for Notifiations to not make a noise

This is probably the only feature that will use it, the noise makes sense for most things we want to use notifications for, but it playing on every scene transition was a bit distracting.

* Adds a hook for OnSeqPlayerInit

* Uses new hook and displays notification instead of overlay text

* Changes names to prevent collisions

Will be registering other types of hooks that will need different ShipInitFuncs in this same file later.

* Change Icon

* Change CVarName and remove now-unused duration slider

* Update ConfigMigrator for CVar changes.

* clang-format

* fix

* bring back duration control

* config v4

* fix v4 migration

---------

Co-authored-by: Christopher Leggett &lt;chris@leggett.dev&gt;
Co-authored-by: briaguya &lt;70942617+briaguya-ai@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Adds ability for Notifiations to not make a noise

This is probably the only feature that will use it, the noise makes sense for most things we want to use notifications for, but it playing on every scene transition was a bit distracting.

* Adds a hook for OnSeqPlayerInit

* Uses new hook and displays notification instead of overlay text

* Changes names to prevent collisions

Will be registering other types of hooks that will need different ShipInitFuncs in this same file later.

* Change Icon

* Change CVarName and remove now-unused duration slider

* Update ConfigMigrator for CVar changes.

* clang-format

* fix

* bring back duration control

* config v4

* fix v4 migration

---------

Co-authored-by: Christopher Leggett &lt;chris@leggett.dev&gt;
Co-authored-by: briaguya &lt;70942617+briaguya-ai@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Turn song text into a notification (#5712)</title>
<updated>2025-08-13T02:56:52+00:00</updated>
<author>
<name>Pepe20129</name>
<email>72659707+Pepe20129@users.noreply.github.com</email>
</author>
<published>2025-08-13T02:56:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=3e39a940833eb0d984fe4bb361a8856e8a2d1c1e'/>
<id>3e39a940833eb0d984fe4bb361a8856e8a2d1c1e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport 2ship streamed audio (#5457)</title>
<updated>2025-06-28T00:15:02+00:00</updated>
<author>
<name>louist103</name>
<email>35883445+louist103@users.noreply.github.com</email>
</author>
<published>2025-06-28T00:15:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=e15f8d395b316c79bbe55af5cbdb483231785f98'/>
<id>e15f8d395b316c79bbe55af5cbdb483231785f98</id>
<content type='text'>
* Bring over changes from 2ship

# Conflicts:
#	.github/workflows/apt-deps.txt
#	soh/CMakeLists.txt
#	soh/soh/resource/importer/AudioSampleFactory.h
#	soh/soh/resource/importer/AudioSequenceFactory.cpp
#	soh/soh/resource/importer/AudioSequenceFactory.h
#	soh/soh/resource/importer/AudioSoundFontFactory.h

* Update xml format

* Format and fix mixer for Windows

* Fixes for new LUS

* Good ole clang-format</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Bring over changes from 2ship

# Conflicts:
#	.github/workflows/apt-deps.txt
#	soh/CMakeLists.txt
#	soh/soh/resource/importer/AudioSampleFactory.h
#	soh/soh/resource/importer/AudioSequenceFactory.cpp
#	soh/soh/resource/importer/AudioSequenceFactory.h
#	soh/soh/resource/importer/AudioSoundFontFactory.h

* Update xml format

* Format and fix mixer for Windows

* Fixes for new LUS

* Good ole clang-format</pre>
</div>
</content>
</entry>
<entry>
<title>Apply clang-format to files (#5273)</title>
<updated>2025-04-02T02:33:38+00:00</updated>
<author>
<name>Archez</name>
<email>Archez@users.noreply.github.com</email>
</author>
<published>2025-04-02T02:33:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/Shipwright/commit/?id=8f126344a4ef22765cfa550146f89bf428e86053'/>
<id>8f126344a4ef22765cfa550146f89bf428e86053</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
