08-15-2024, 06:28 PM
(08-15-2024, 06:15 PM)NakedApe Wrote: Hey @justsomeguy. I'm wondering why you want the length of the sound file to control fading in and out. I just used _SNDVOL to control fading an array of sounds in my recent game and it worked fine. What's your approach?I have several looping background music files. Some have no real intro, they just abruptly start and stop. I use the 5% of both ends to LERP the volume from 0 to 1.0 and 1.0 to 0.
For example, if a piece of music is 100 seconds. I raise the volume from 0-1.0 over 5 seconds and at 95 seconds I lower the volume from 1.0-0 over the last 5 seconds.
2D physics engine https://github.com/mechatronic3000/fzxNGN
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool