i have a 15 second clip i want to loop as long as a certain unit is on the field
i made a loop with death counts a long time ago on another map, but before i go looking for it, does anybody know a different/better way to loop music?
None.
Multiply the length of the song by twelve, and that's the number of death counts needed to (theoretically) loop it perfectly. That's most likely your best bet for looping music, so I'm not sure why you'd use a different method. There's waits, but that causes heavy blocks.
If you want the short clip to end when you exit the field then split the music file into a few different .wav files and set the death count needed to play that clip accordingly.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Since with music loops it's important to be exact to avoid stuttering I'd go with 11.8 death counts per second play time.
Round it up for short overlappings are less audible than short silences.
Trial-and-error has always worked most effectively for me when it comes to looping music. If you want to split up your sound into smaller files like inferno suggested,
Audacity is a good free program.
None.
I don't think you can ever perfectly loop a sound clip though. Wouldn't the latency of the game affect the death counts for playing the music?
None.
I don't think you can ever perfectly loop a sound clip though. Wouldn't the latency of the game affect the death counts for playing the music?
Yes, and so do pauses and disconnect screens.
None.
Maybe one idea could be to let the users configure the playback rate in-game to compensate for lag? Like with an in-game slider or something.
None.