|
Post by alancstone on Aug 12, 2014 19:35:22 GMT
Hello, I was having trouble getting my music playlist to fade, and figured out it was because the coroutine MasterAudio uses to tween the fade was not running.
The following patch fixes it:
PlaylistController.cs
void Start() {
>>> StartCoroutine(this.CoUpdate());
if (string.IsNullOrEmpty(startPlaylistName)) {
return;
}
// fill up randomizer
InitializePlaylist();
if (currentPlaylist != null && startPlaylistOnAwake) {
PlayNextOrRandom();
}
<<< StartCoroutine(this.CoUpdate());
} This only occurs if the PlaylistController does not have an initial playlist configured. In my scenario I dynamically decide which playlist to use at runtime, so it doesn't make sense to configure an initial playlist.
Also I noticed that if I pause a playlist controller, change to a different playlist, then play the playlist controller, then try to fade the playlist controller's volume then the new playlist's volume is not changed. It appears that PlaylistController uses the alternate AudioSource for the new playlist since the old playlist is still considered active, but only changes the volume of the old (now unused) AudioSource. I was able to work around this by stopping the playlist controller before playing the new playlist. This causes PlaylistController to reuse the old AudioSource.
|
|
|
Post by DarkTonic Dev on Aug 13, 2014 0:11:02 GMT
Actually I took a look and you don't have the latest version. The code you posted will work, but there's no longer a return statement in that method so that CoRoutine always starts. I'll check out the other bug too.
|
|
|
Post by DarkTonic Dev on Aug 13, 2014 6:20:59 GMT
I wasn't able to reproduce the 2nd bug about the fading. I did those steps.
If you would like to send me a small project that reproduces the problem I'll take a look again.
-Brian
|
|