atamize
New Member
Posts: 5
Posts: 5
|
Post by atamize on Oct 10, 2014 15:01:36 GMT
I don't want to use crossfading because there is a noticeable and seemingly unavoidable stutter in my game when songs change in a playlist when using streaming audio. Instead, I'd like each song to fade in and fade out entirely before loading the next song. Is there an option to do this? According to the readme, if the playlist is not set to auto-advance, it will fade out the "last" song (which is every song) but I do want it to auto-advance.
|
|
|
Post by DarkTonic Dev on Oct 10, 2014 15:17:05 GMT
I believe your stutter comes from trying to stream 2 tracks at the same time (during the crossfade) which is very taxing on the Unity audio engine. I would recommend not streaming and using Resource files instead. That may fix your problem. But if you don't have Unity pro (and can't use the Async loading feature), that won't for sure solve your problem. It's worth a shot though.
There's nothing built in for fading out every song unless you make each playlist a single song. Then the last (only) song could be made to fade out. But you'd need to write code to change Playlists after the song ends using the SongEnded event in PlaylistController.
-Brian
|
|
atamize
New Member
Posts: 5
Posts: 5
|
Post by atamize on Oct 10, 2014 15:34:11 GMT
I did try not streaming and using resource files with Unity Pro, but there was still a stutter.
The fading would be a nice option to have. In the meantime, I can bake the fades into the source files.
|
|
|
Post by DarkTonic Dev on Oct 10, 2014 15:53:12 GMT
To clarify, you can't use streaming and Resource files at the same time. Resource files are not allowed to stream, they are fully loaded into memory when played, even if marked as streaming. I did not get any stuttering on my iPad2 using resource files and crossfading. What platform are you using?
I'm afraid the fading will not play nice with crossfading (although you're not wanting to use both at the same time), so that probably will not be added. But feel free to add your request to the roadmap thread here and we can take a look later.
You also can use the "FadeToVolume" command on the Playlist to fade at a certain time instead baking in your fades.
|
|
atamize
New Member
Posts: 5
Posts: 5
|
Post by atamize on Oct 10, 2014 16:04:32 GMT
I'm also using an iPad 2. I mentioned in the other thread I made that I can't reproduce the stuttering using a barebones project, so my game is probably just too much of a resource hog at the moment. Thanks anyway.
|
|
|
Post by DarkTonic Dev on Oct 10, 2014 16:08:34 GMT
Ah right. Ok, let me know if we can assist on anything else. This one there's probably nothing to be done except for writing some code for fade.
|
|