Separate audio files for looping audio #31737
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #16496 in part; this forum discussion and this one more thoroughly; this one in part
This adds the option to, when exporting audio, export the "tail", the part of the audio after the time for the last note is allotted but the music still reverberates, and the head, the part before, and the overlay of the tail over the start of the head, as three separate files. Prior to the last commit, only the tail was separated.
The mechanism for this, including naming the new files, is done in the SoundTrackWriter object with multiple encoders, rather than any higher level of abstraction, to prevent multiple calls to generateAllAudio() or modifications to higher-level abstractions of players. Much of the code changes exist to transport the separateTail flag into the audio configuration and to the mechanism for noting whether multiple files are being created.
The decision to offer two files split at the seam resolves one primary user difficulty in identifying that seam (it isn't obvious that it's hardcoded to be three seconds); and is simpler than attempting to use the mixer - or add a mechanism to the SoundTrackWriter - to overlay sound. Simplified design from @MarcSabatella 's discussion, if they'd like to weigh in here as well.