otsego
New Member
Posts: 2
Posts: 2
|
Post by otsego on Mar 21, 2015 15:00:50 GMT
Hello! I faced a problem. I made playlist controller volume is less than 1.0f. Then, when I create a playlist from code and change its crossFadeTime to 0.0f, the playlist's volume becomes 1.0f. It's not expected. Here's creating code: void CreatePlaylist(string playlistName, AudioClip song, float crossFadeTime) { MasterAudio.Playlist playlist = new MasterAudio.Playlist(); playlist.playlistName = playlistName; playlist.fadeInFirstSong = true; // <---- comment this line and problem will disappear playlist.fadeOutLastSong = true; playlist.crossfadeMode = MasterAudio.Playlist.CrossfadeTimeMode.Override; playlist.crossFadeTime = crossFadeTime; MasterAudio.CreatePlaylist(playlist, true); MasterAudio.AddSongToPlaylist(playlistName, song); } If remove "playlist.fadeInFirstSong = true;" line, then problem disappears. I made simple test project for you, so you can see it by your self. Link: dl.dropboxusercontent.com/u/97506489/CrossfadingBug.7zCheck "bug test" folder in the project and open "test" scene. Run it. You will hear music. Then click button "Create new playlist". This action will create new playlist with same audio clip and start it to play. Now playlist volume became louder.
|
|
|
Post by DarkTonic Dev on Mar 21, 2015 18:44:55 GMT
Ok, fixed the volume bug, although these settings make no sense to use together. You see, crossFadeTime will be used to fade in the first song. But you have crossFadeTime set to zero, so there will be no fade in.
The volume no longer jumps and will be fixed in the next update. Might as well turn fadeInFirstSong back to false.
|
|
otsego
New Member
Posts: 2
Posts: 2
|
Post by otsego on Mar 21, 2015 22:05:39 GMT
>Ok, fixed the volume bug Thanks!
>although these settings make no sense to use together Oh, you're right. It seems I spent much time senselessly to find roots of the problem.
|
|
|
Post by DarkTonic Dev on Mar 22, 2015 4:59:59 GMT
Well it's good the bug is fixed regardless
|
|