ghet
New Member
Posts: 3
Posts: 3
|
Post by ghet on Jul 22, 2021 10:50:42 GMT
Hello,
I have a sound group with 5 variations and I would like to play max 1 of them at time. So I have turned on "Limit Polyphony" and sat it to 1, but it is still playing 2-3 variations at time. Is it not purpose of this setting to limit amount of variations that will be played simultaneously?
Best regards, Ghet
|
|
DarkTonic Dev
Administrator
Posts: 4,383
Posts: 4,383
Member is Online
|
Post by DarkTonic Dev on Jul 22, 2021 16:46:16 GMT
I couldn't reproduce the issue you're seeing. I see this in the Console if I try to play a 2nd Variation (I turned on Log Sounds for the Sound Group).
T: 7.061491 - MasterAudio: Polyphony limit of group: Arrow exceeded and no playing Variation is usable for Retrigger Limit Mode. Will not play this sound for this instance.
You will need to send me a Scene that reproduces the issue so I can see what's going on.
If you like, you can also limit the voice on the Bus it goes to. There are 2 ways to limit voices.
-Brian
|
|
ghet
New Member
Posts: 3
Posts: 3
|
Post by ghet on Jul 23, 2021 17:39:30 GMT
I couldn't reproduce the issue you're seeing. I see this in the Console if I try to play a 2nd Variation (I turned on Log Sounds for the Sound Group). T: 7.061491 - MasterAudio: Polyphony limit of group: Arrow exceeded and no playing Variation is usable for Retrigger Limit Mode. Will not play this sound for this instance. You will need to send me a Scene that reproduces the issue so I can see what's going on. If you like, you can also limit the voice on the Bus it goes to. There are 2 ways to limit voices. -Brian Interesting bug. If you enable Log Sounds for the sound group then it works fine. It is because when you have logs turned on then you return null when limit polyphony triggers, but if you have no log sounds turned on then it will play sound. See line 2089 in MasterAudio.cs. You are checking there that source is null and logs are on, to return null. You should return null there no matter if logs are on or off. Hope this helps. Best regards, Ghet
|
|
DarkTonic Dev
Administrator
Posts: 4,383
Posts: 4,383
Member is Online
|
Post by DarkTonic Dev on Jul 23, 2021 21:15:58 GMT
Thanks you are right! The next update will have this code. You can make the change in your build now.
if (IsGroupPolyphonyLimited(maGroup, @group)) { randomSource = FindRetriggerableVariationInGroup(variationName, isNonSpecific, sources, maGroup);
if (randomSource == null) { if (loggingEnabledForGrp || LogOutOfVoices) { LogMessage("Polyphony limit of group: " + @group.Group.GameObjectName + " exceeded and no playing Variation is usable for Retrigger Limit Mode. Will not play this sound for this instance."); }
return null; } }
|
|