Search Unity

Audio SDK - Possible for plugins to output pre-spatializer?

Discussion in 'Audio & Video' started by richtea, Nov 16, 2015.

  1. richtea

    richtea

    Joined:
    Oct 22, 2015
    Posts:
    5
    I'm working on a native plugin which will produce audio. I would like to be able to dynamically position that audio within the game world in the same way as a standard Unity audio source, making use of any spatializer plugins available.

    I see that the Audio SDK has a sample synthesizer effect, however it appears that has to be instantiated on an audio mixer group which (if I understand correctly) comes after spatialization in the signal chain.

    Is there any way I can create sources from a native plugin such that they can be positioned generically? It looks like I can do it via attaching a script with OnAudioFilterRead to an audio source, but that has an overhead involved marshalling data to and from an external plugin. Is that right or am I missing something? Would like to keep things both as efficient and as modular as possible.

    On a related note, is it possible to create plugins with channel counts that differ from the project? For instance if I want to create a plugin that downmixes 5.1 to stereo in a stereo project, or a sampler with 32 outputs?