UAudio Update
I've spent some time looking at UAudioManager and have some changes I'd like to make but thought I'd start this conversation before diving in with a pull request.
-
Remove UAudioMiniManager. This looks like a very specific solution to a very specific problem. It would also prevent (2) from occurring since the MiniAudioEvent directly references scene components (AudioSource).
-
Author audio events as AudioBank assets. At present all the events for your application would need to live inside the UAudioManager component.
Changing to a bank style asset based system has the following advantages.
- You can load / unload banks at run-time
- Your sound engineer does not need the scene to modify events
- You can load different banks depending on application settings/events (language, chosen the "Metal" theme etc)
- It is easier to transport audio events between projects (you can "Export" the audio bank asset)
Now the above are reasonably straight forward changes, but the question really is should we go deeper on these changes to allow for an extensible system. i.e. it is impossible to add a new container type without modifying the library source. Should the system support more external customisation?
Finally, is there any real requirement/desire for this system since it seems that the audio system hasn't really changed over time.
Pinging @davidkline-ms
-
You're absolutely right - the MiniManager's purpose is to author audio content independently from the global UAudioManager. Think DLC content that includes audio. It was needed for a project we worked on, though some of the needs would be solved by...
-
Been wanting to do this for a while now. I have no idea how many people are using the current version of UAudioManager, so I think maybe there's a conversation about deprecating it for this new extensible version.
I can't really answer the requirement/desire question, though I'd love to know. This manager was created for teams that aren't using some kind of middleware as a simple way to give sound designers a little control in Unity's native audio system. But how many MR developers are using middleware anyway? How many are using custom solutions or other Unity assets? I think if there's a direction to take it that makes it easier or more useful than other solutions, we should just do it.
I'm with @joekellyms. I would be a huge fan of a version that used banks (skinable audio would be a welcome feature).
Thanks! David
So I've performed some preliminary investigations and have a modified version of UAudioManager that supports audio bank assets. This is the minimum set of changes that can support bank assets while maintaining some degree of backwards compatibility. I think any other changes would get into "Version 2" territory with limited backwards compatibility.
You can look at the branch here https://github.com/DaveSullivanAtWork/MixedRealityToolkit-Unity/tree/UAudioBank
Highlights:
- Moved all the event data to a ScriptableObject.
- Added an export to audiobank option if events are present in the UAudioManager component
- Added support for unity volume curve to spatial sounds.
- Removed Lowpass curve (it was unused).
- Removed UAudioMiniManager
- Updated the example scene.
Another update to the UAudioBank branch.
- Removed the obsolete HRTF parameters and associated audio event properties.
Does the UAudio stuff take advantage of the mixer groups?
Yes, you can set a mixer group in the audio event.
bump How do things stand with this issue after 7 months? I've just spent the afternoon thinking out something very similar so was pleased to see the work mostly already done! :)
I also have some ill-formed thoughts about adding some kind of bridge to listen in to events from the input system and issue (perhaps a subset of) corresponding 'audio events' that could be handled, and independently consumed, by relevant objects in the same manner as the current input events... But that's probably a thing for another Issue/PR :)
Edit: Resolved
Actually had a great conversation about this at build with @joekellyms.
He also has some improvements he wants to implement in vNEXT that had a lot of breaking changes from the current implementation, so now is the best time to do them.
Joe, did you wanna elaborate for everyone what those were?
Would definitely be interested to hear more. Since my last comment I've put a little system together, more or less as described above but also with its own 'fallback' handler to provide centrally configurable, app-wide UI audio, which is serving as a decent stopgap for our team. Having a toolkit solution would be lovely though.
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.