|
Post by totalchen on Jul 29, 2020 6:04:11 GMT
Hi,
I got an problem when using duck feature. I use this method to duck my music.
MasterAudio.AddSoundGroupToDuckList(soundEffectName, MasterAudio.Instance.defaultRiseVolStart, MasterAudio.Instance.defaultDuckedVolumeCut, MasterAudio.Instance.defaultUnduckTime, true);
MasterAudio.PlaySound(soundEffectName); It works. But then I pause my soundgroup.
MasterAudio.PauseSoundGroup(soundEffect); The duraction of the sound is 3 seconds, I pause it on about 1.5 seconds. 1.5 seconds later, the ducking music volume is set back to original volume. Is there any way to stop ducking time calculate(I check the code, and I know is calculate by time), or is this a bug? thanks
|
|
|
Post by DarkTonic Dev on Jul 29, 2020 15:37:05 GMT
Ducking is activated by the "triggering" of the Sound Group. It is fire and forget. It has no knowledge of whether it gets paused or not afterward.
It's not a bug, it's a limitation. It was never designed to care about that. In fact, the ducking code was written before you could pause anything.
If you think this is very important, I can look into whether it's feasible to fix or not. Let me know.
-Brian
|
|
|
Post by totalchen on Jul 31, 2020 6:42:49 GMT
Yes, please. I really need this feature in my game. If you could find a way to make it happen, I would appreciate it.
|
|
|
Post by totalchen on Jul 31, 2020 6:50:55 GMT
By the way, the situation is the same when I stop soundgroup.
|
|
|
Post by DarkTonic Dev on Jul 31, 2020 16:02:25 GMT
I have fixed this for the next update. You can email me with your asset store invoice PDF file if you want to get the update now at support@darktonic.com
|
|
|
Post by totalchen on Aug 5, 2020 2:22:59 GMT
Thanks, I'll wait for the next update.
|
|
|
Post by DarkTonic Dev on Aug 5, 2020 3:24:13 GMT
Perfect.
|
|
|
Post by totalchen on Oct 8, 2020 3:15:55 GMT
Hi, I got the unity asset store update, it was fixed. But I got another issue,
MasterAudio.PauseSoundGroup("SoundName"); -> the ducking is paused or stopped.
Then I unpuase like this MasterAudio.UnpauseSoundGroup("SoundName"); -> the ducking is still paused or stopped.
Is there a way I can fix this by my self or you would fix it? Thanks.
|
|
|
Post by DarkTonic Dev on Oct 8, 2020 15:55:55 GMT
I will take a look in the next day or so and report back. Thanks.
|
|
|
Post by DarkTonic Dev on Oct 8, 2020 22:19:10 GMT
|
|
|
Post by totalchen on Oct 12, 2020 1:33:27 GMT
Thanks, I'll take a look.
|
|
|
Post by totalchen on Oct 12, 2020 3:08:37 GMT
Hi, I think that's different problem.
Before pause sound group, Master Playlist Volume is 1.0
After play sound, -> Master Playlist Volume is 0.31
MasterAudio.PauseSoundGroup("SoundName"); Master Playlist Volume resumes to 1.0
Then I unpuase like this MasterAudio.UnpauseSoundGroup("SoundName"); -> Master Playlist Volume is still 1.0
Thanks
|
|
|
Post by DarkTonic Dev on Oct 12, 2020 5:15:05 GMT
Regardless, you don't have my fix for latest ducking bug in that other thread because it's not released yet, and in my test I could not reproduce your issue. I would like you to test it with the latest. You can either self-apply the fix in that thread, or email us for the latest beta. Make sure to provider your Asset Store Invoice PDF file when requesting.
Thanks, -Brian
|
|
|
Post by totalchen on Oct 12, 2020 6:38:39 GMT
I have added the code in PlaystController.cs, and it didn't work.
case AudioDuckingMode.Unducking: _activeAudio.volume = _initialDuckVolume + (Time.realtimeSinceStartup - _timeToStartUnducking) / (_timeToFinishUnducking - _timeToStartUnducking) * _duckRange; if (Time.realtimeSinceStartup >= _timeToFinishUnducking) { _activeAudio.volume = _originalMusicVolume; ResetDuckingState(); } break;
I would try to make a example project to show you.
|
|
|
Post by totalchen on Oct 12, 2020 8:55:47 GMT
Hi, I have send you a message. Please check it, thanks.
|
|