wumpee
New Member
Posts: 3
Posts: 3
|
Post by wumpee on May 18, 2014 11:32:44 GMT
Hi,
I have a small issue with ducking... I have a single playlist playing (one music track), and a looping sound effect group (music also, but treated as a sound effect) that cuts in during combat (it seemed logical to set this up as a group due to the way it works).
The problem is that the music ducks fine, but when I stop the combat sound with MasterAudio.StopAllOfSound or MasterAudio.FadeOutAllOfSound, it doesn't start unducking until 50% of the way through the combat sample, which is about a minute long.
It appears that unducking isn't taking place when you stop a sound from playing - is that correct?
Also, out of interest, is there a way of implementing what I'm trying to do using playlists?
|
|
|
Post by DarkTonic Dev on May 18, 2014 18:54:47 GMT
Yeah ducking is fire-and-forget. It doesn't care what happens to the sound (in fact doesn't track it) after the ducking begins. We are hesitant to add this complexity to ducking since when Unity 5 is released, it will have native audio ducking and we will be removing ours.
Playlists have no ducking interaction with each other, however you can do it manually by using things like "FadePlaylistToVolume". Will that work for you? How much percent are you ducking? If it's 100%, you should just crossfade to another Playlist clip instead.
|
|
wumpee
New Member
Posts: 3
Posts: 3
|
Post by wumpee on May 19, 2014 23:16:23 GMT
Yeah ducking is fire-and-forget. It doesn't care what happens to the sound (in fact doesn't track it) after the ducking begins. We are hesitant to add this complexity to ducking since when Unity 5 is released, it will have native audio ducking and we will be removing ours. Playlists have no ducking interaction with each other, however you can do it manually by using things like "FadePlaylistToVolume". Will that work for you? How much percent are you ducking? If it's 100%, you should just crossfade to another Playlist clip instead. That kind of sucks, but I can understand why you've set it up that way. I think you have a good point with completely cross-fading the music to a different playlist and not worrying about ducking... I imagine doing so would be just as ideal since I'm playing combat music any way, so there's really no point in having the main music still lingering at a low volume.
|
|
|
Post by DarkTonic Dev on May 20, 2014 0:48:24 GMT
Ok. Ducking is normally just for short percussive sound effects like explosions. When you use it for that, it works just fine.
|
|
wumpee
New Member
Posts: 3
Posts: 3
|
Post by wumpee on May 20, 2014 23:45:21 GMT
Ok. Ducking is normally just for short percussive sound effects like explosions. When you use it for that, it works just fine. I tested switching to a new play list for the combat music, then back to the main playlist when combat is over, but it restarts the playlist each time even if I select the option to remember where it was. I ended up using PlaylistController.FadeToVolume(0.5f, 0.5f) when combat starts, and PlaylistController.FadeToVolume(1F, 0.5f) when combat is over.
|
|
|
Post by DarkTonic Dev on May 20, 2014 23:49:38 GMT
Correct. Switching to a new playlist always starts at the beginning of the first song - that is by design, since each Playlist can have a different Song Transition Mode. There were 2 bugs about that that I fixed recently. Song Transition Mode is only used for songs 2+. If you switch to a song in the same playlist, it will work as you intend.
|
|