Using HaxeFlixel, typing out text letter by letter with FlxTypeText, playing each character, the typing sound effect cuts out exactly after the 255th character, with the music and any other sound effect cutting out as well shortly after.
Debugging through cmd, it throws these two errors:
The sound comes back on various actions like un/refocusing the game window or randomly on it’s own.
Weirdly,this error won’t happen when setting Windows 7’s color scheme to basic, disabling aero.
My best guess is the sound using a new channel each time it’s played, where it should just be re-using a single channel, as it’s only a single sound effect restarting over and ever without ever overlapping itself. I don’t understand enough about the magic behind HaxeFlixel and it’s components to validate that assumption, though.
If you want to try it for yourself, you can do so using the FlxTypeText demo from the flixel-demos repository, or really just playing any sound for more than 255 times in any project.