shredd
New Member
Posts: 5
Posts: 5
|
Post by shredd on Aug 21, 2015 12:53:21 GMT
Hi! I'm trying to figure out how to get a smooth, precise transition from one clip to the next within a single playlist. My level music is set up in a way where I have an intro file and a loop file. The intro file plays once and the loop file repeats thereafter until the player exits the level. The loop itself repeats perfectly and on-beat, but when the intro file transitions over to the loop file, there's an obvious skip.
There is no silent gap, but the intro file kinda cuts short, and the loop file starts just too early and it messes up the beat. The amount of skipping isn't constant. Sometimes it's more noticeable than other times, but you can always tell it happens. (I like prog but I'd prefer not to have these random, "almost 7/8" interpretations of my 4/4 measures... ) Both files' load type is set to Streaming, and they're as ResourceFiles. They're imported as .OGG files (I tried .WAVs earlier), compression format Vorbis, quality 100, Preserve Sample Rate. Any help is much appreciated!
|
|
|
Post by DarkTonic Dev on Aug 21, 2015 15:27:14 GMT
FYI, you can't stream a Resource file (Unity limitation: Resource files are always fully loaded so can't stream), so checking both streaming and using a Resource file won't do both. I would try using either streaming OR resource files OR turning off "preload audio data" on the audio clips instead.
Also:
1) You set crossfading to zero seconds, correct? 2) Did you try turning on "gapless song transitions" in Advanced settings?
We haven't had any problems doing the same thing with our loops.
|
|
shredd
New Member
Posts: 5
Posts: 5
|
Post by shredd on Aug 22, 2015 13:53:58 GMT
Thanks for clarification. Anyway, we changed back to Compressed In Memory setting for music files, and preload audio data is off. Still the same problem though. Crossfading is 0. Gapless Song Transitions doesn't fix it, and actually introduces a number of other issues (but I presume we're using it incorrectly in some way): when my playlist starts, it starts both files simultaneously on top of each other, and the "loop" file is then quickly stopped (in about half a second or so) and the intro file continues normally. The eventual transition between the two sounds the same as without Gapless Song Transition.
The problem really seems to be that the intro file gets cut short by a random amount, instead of being let play to the very end. Could it be related to FPS or how frames are handled, how stuff is loaded? The game runs perfectly at 60 FPS though, and the issue happens both at my powerful desktop and much weaker laptop.
|
|
|
Post by DarkTonic Dev on Aug 22, 2015 16:50:48 GMT
Sorry, but I'm out if ideas until you send me an example project that reproduces the problem. We can't reproduce anything like it here. Transitions work fine with gapless on or off for us unless frame rate is like 10 FPS or less.
There's no way to incorrectly use gapless transitions by the way. It's either on or off, and that's all there is to it. We aren't aware of any bugs with that either, so if you want us to fix that one, you'll also need to send us an example project showing it. Indeed when using gapless, the Audio Source for the next song is set and scheduled immediately, but it's not playing or audible until the time the current song is over.
|
|
shredd
New Member
Posts: 5
Posts: 5
|
Post by shredd on Aug 25, 2015 11:41:20 GMT
We'll change some approaches in our code. I'll report back asap!
|
|
|
Post by DarkTonic Dev on Aug 25, 2015 17:20:32 GMT
Sounds good
|
|
shredd
New Member
Posts: 5
Posts: 5
|
Post by shredd on Sept 4, 2015 11:42:54 GMT
Heya, I PMd you with a test project file for this problem.
|
|
|
Post by DarkTonic Dev on Sept 5, 2015 3:07:32 GMT
Thank you, responded to your message now that I've had a chance to test it.
|
|