REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

Feature Request: Ability to Set Start Times for Music and Sounds

Open Miki0110 opened this issue 1 year ago • 2 comments

I'm reaching out to suggest an enhancement for the audio playback functionality. Would it be possible to consider the addition of a startTime parameter to the existing audio play function? This parameter would allow modders to specify the exact point in time from which a sound or music track should start playing, enhancing the ability to synchronize audio with specific game events or scenes.

If this is possible it would allow me to finally fix my biggest gripe with Isaac, which is the constant restarting of music. I swear you only ever hear the first 20-30 seconds of each track in the soundtrack.

Miki0110 avatar Feb 29 '24 12:02 Miki0110

was about to suggest this, as well as a function that would return the current 'progress' of the currently playing music, though I was thinking it could be a float from 0 to 1 representing the percentage of the song played, rather than time in seconds, that way you can control music playback point for tracks of varying lengths without having to check how long they are

e.g. MusicManager():Play(songID, 1, 0.5) would always play the song from the very middle, and if you wanted to play a song from the start but skip its intro you could do MusicManager():Play(songID, 1, 1) to make it start playing at the very end of the song and then immediately loop

NAT0P0TAT0 avatar Jul 20 '24 15:07 NAT0P0TAT0

Have been reverse engineering how sounds are played, this would be very non-trivial as KAGE sound actors have absolutely no ability to do this, would need to thus reverse engineer OpenAL and how it interfaces with the game as well

namishere avatar Jul 20 '24 18:07 namishere