|
Post by dreasgrech on Jul 4, 2015 12:30:49 GMT
I'm currently playing a sound like this:
public PlaySoundResult PlaySound3D(string groupName, Vector3 position) { return MasterAudio.PlaySound3DAtVector3(groupName, position); }
and stopping the sound like this:
public void StopSound3D(PlaySoundResult soundResult) { soundResult.ActingVariation.FadeOutNow(); }
The reason I'm calling FadeOutNow() is because I want the variation to fade out using its custom fade settings, and that works fine.
But what I realized is that if for example my voices is 5 and I play the sound 5 times and stop it 5 times, it won't start any more and I get this log:
It's like for some reason, even after I called FadeOutNow() on the sounds, they're still considered busy.
I have also enabled all the Masteraudio > Advanced Settings> Fading Settings so that fading to zero volume should supposedly Stop the audio sources, but they still refuse to play after hitting the max voices.
How can I fix this issue?
P.S. If I stop the sound with Stop() instead of FadeOutNow(), everything works fine (except of course the fading).
|
|
|
Post by dreasgrech on Jul 4, 2015 15:23:24 GMT
So what I just now realized is that what's happening is that if I have a sound group of one variation with 2 voices (Voice #1 and Voice #2), and Voice #1 is currently in use when I call Playsound3DAtVector, the method is sometimes returning the busy Voice #1 (which would currently be playing) in PlaySoundResult to play rather than Voice #2 which is free. And so I get the "All children of Waterpump were busy. Will not play this sound for this instance" log because it would be unable to play.
I guess I must be missing something here, but why is Masteraudio giving me a voice with PlaySound3DAtVector which is currently playing (i.e. busy), rather then a voice which is free?
|
|
|
Post by DarkTonic Dev on Jul 4, 2015 18:58:47 GMT
Only 1 reason why that would happen. And that's if you have Retrigger Percentage for the Sound Group set to number less than 100%, which indicates that it can be stolen away for other purposes. However, that normally should not happen until the random pool of Variations refills (after you play all 5). There's also the "top to bottom" instead of Random switch. If you have that turned on with "refill after X seconds", it will refill the pool after X seconds instead of playing all the Variations. At that point Retrigger Percentage could allow re-use of a busy Variation.
If it is happening differently, you will need to send me an example project that reproduces this bug, because it doesn't happen for me.
|
|