itilos
New Member
Posts: 3
Posts: 3
|
Post by itilos on Jul 17, 2023 18:02:32 GMT
Hello!
I have a rain sound effect set up with one variation like so:
Now, when I try to run it, the audio fails to play and I get
MasterAudio: All 1 children of RainThunderstormEdited were busy. Will not play this sound for this instance. If you need more voices, increase the 'Voices / Weight' field on the Variation(s) in your Sound Group.
When I increase it to 2 voices allowed on the sound group, it creates a second child in the inspector, and correctly runs, but this confuses me.
Since there is only 1 variation, shouldn't it correctly run when only having 1 "Voices/Weight"? Do I have something else configured incorrectly?
<script src="moz-extension://dffe51c8-584b-485b-8c04-3ce9b9173d61/js/app.js" type="text/javascript"></script>
|
|
|
Post by DarkTonic Dev on Jul 17, 2023 20:29:58 GMT
Yes, your second screen shows that you have 1 voice and your second screen shows that the Bus can play up to 3 sounds.
There's "code warming" that silently plays the first variation of the first Sound Group when Unity starts play mode. If you tried to play the sound during that, it wouldn't work. If it was done warming, it would work. Aside from that, if you have other Sound Groups or it's not the first, that's not it.
You can optionally turn off code warming in Advanced Settings if you like, but that first time you go to play a sound will take substantially longer as the code warms then (there will be latency).
-Brian
|
|
itilos
New Member
Posts: 3
Posts: 3
|
Post by itilos on Jul 17, 2023 23:21:02 GMT
Got it - I'm trying to play that one sound with the Start event - will this fail when there's only 1 voice due to that warming?
|
|
|
Post by DarkTonic Dev on Jul 18, 2023 3:23:33 GMT
It will. Since I see you have the sound configured as a Resource file, it will take a few frames to load before it plays silently. It will definitely be busy during Start.
I can see about adding a more specific warning to the Console if the code is still warming, would that be helpful?
-Brian
|
|
itilos
New Member
Posts: 3
Posts: 3
|
Post by itilos on Jul 18, 2023 16:45:25 GMT
A warning would probably be helpful! In the future it might be confusing if the warming is something one isn't aware of. Thanks!
|
|
|
Post by DarkTonic Dev on Jul 19, 2023 21:55:39 GMT
Ok, I will see if it's easily done and report back.
|
|
|
Post by DarkTonic Dev on Jul 24, 2023 18:25:50 GMT
Unfortunately it's not feasible to detect this as it can be looping through 2 different lists of sounds based on Randomization and other parameters.
I did add this to the warning message.
"A silently warming sound can also cause this."
|
|