fizzpow
New Member
Posts: 3
Posts: 3
|
Post by fizzpow on Jul 8, 2014 22:31:08 GMT
What I am trying to do in our game is to have two playlists that I can switch between, but maintain current position when switching and crossfade. Here is what I tried.
1) If I use one playlist controller, I can switch playlists with crossfade, but not maintain position. Using MasterAudio.ChangePlaylistByName()
2) If I use two playlist controllers, I can switch playlists maintaining position, but not crossfade. Using MasterAudio.PausePlaylist() & MasterAudio.ResumePlaylist()
Any solution I am missing? I know I could do some kind of manual .FadeToVolume on each controller, but figured there might be a better option.
Thanks!
|
|
|
Post by DarkTonic Dev on Jul 8, 2014 23:17:02 GMT
My first question is why do you need multiple playlists? Can you just use a single playlist for what you want? Because the "last known position" song transition mode will do what you want, but only in its own playlist.
|
|
fizzpow
New Member
Posts: 3
Posts: 3
|
Post by fizzpow on Jul 8, 2014 23:32:31 GMT
Well I have songs to play when in one mode of game and a song to play in another mode, and I don't want either mode to have access to eachother's songs. If there's a way to accomplish that, then great.
|
|
|
Post by DarkTonic Dev on Jul 8, 2014 23:35:10 GMT
If you only play specific songs by name, you can control which songs play in each area and use a single playlist. Otherwise, I can't think of a way to do what you want with multiple playlists without writing a bunch of code yourself.
|
|
fizzpow
New Member
Posts: 3
Posts: 3
|
Post by fizzpow on Jul 9, 2014 0:37:36 GMT
The main list is on shuffle, so that won't work. Ok, I made a solution, just was hoping for something easier =)
Here is what I did: (and then reverse it when going back)
var playListPhone = PlaylistController.InstanceByName("PlaylistPhone");
playListPhone.FadeToVolume(0, 0.5f, () =>
{
playListPhone.PausePlaylist();
});
var playListMain = PlaylistController.InstanceByName("PlaylistMain");
playListMain.PlaylistVolume = 0;
playListMain.ResumePlaylist();
playListMain.FadeToVolume(1, 0.5f);
|
|
|
Post by DarkTonic Dev on Jul 9, 2014 3:09:16 GMT
There you go, that should do it 
|
|