The documentation and indeed the functionality of the standard Unity Audio Listener component is very limited.
I’d like to make my own audio listener, so that I can have control at the listener side of which sound sources are rendered to the audio output channels.
So, basically in short, I’d like to modify the code for the standard Unity audio listener object or something equivalent.
I notice for example that the Wwise plugin overrides the standard AudioListener with its own, how could I go about doing something like this?
Thanks for the comment, but there must be some way to do it in 4.x asthe Wwise plugin is a able to define its own audio listeners, but i’m unsure of where to look or what to search for to make that type of component.
That’s saying they don’t know… not that it can’t be done. Orb’s point in their post, and why the responded, is that the audio will be much better once 5.0 comes out. Basically saying, you don’t have to write your own if you don’t mind waiting for that.
I’m not sure what Wwise plugin does it either. But looking at the system it appears to be its own custom sound engine. This means it doesn’t touch any of the unity sound.
I’m betting that when using it you just don’t ever turn on unity audio, and instead use their audio the whole time. Their engine is what creates and outputs audio to the sound device (soundcard, whatnot).
It would require writing your own sound engine, and then writing the plugin to allow communication between your unity game and said sound engine.
Can you design a sound engine? If not, buy Wwise, or just wait for Unity 5.0.
Indeed and thanks for your time and polite comment.
I could make my own sound engine but it would defeat the object of using Unity in the first instance to manage the sound objects and associated characteristics and so I’ll avoid that route.
In that case, I think the intermediate solution is to identify all active playing AudioSources, perform desired processing and stream the resulting audio over a socket to an external app which can pass the samples to the DAC.
Does this sound reasonable?
Its not ideal but it facilitates progress and the “desired processing” code could be recycled most likely when U5 comes along.