New Audio API: more to be exposed soon?

Hi to all,

First, a big bravo to Wayne and Jan for their amazing work. Very nice indeed! It’s absolutely awesome to see that after a few years of stagnation, Unity’s audio is finally in the spotlight and making huge progress. It’s all clear, well integrated, nice gui… a big lump of awesome.

I do have a few questions regarding the API, as not much ( as of now ) is exposed:

  1. Can we expect mixing callbacks at some point in the future? An opportunity to grab audio data at any point in the process would be great. Something like OnAudioFilterRead: a delegate callback that we could hook to in order to inspect data just before a group / mixer is mixed:
AudioMixer.OnWillMixGroup( AudioMixerGroup group, float[] groupData ) //Access group filtered data

AudioMixerGroup.OnDidMixSources( AudioSource[] sources, float[] mixedData ) //access pre-filtering audio data of a group
  1. Adding/removing filters to mixers/groups at runtime: anything planned? Similarly, what about routing sends at runtime?

  2. AudioMixer.Set/Get/ClearFloat can only be called from the main thread. Wouldn’t it make sense to have access from the audio thread? When tweening a parameter, a dip in frame rate can cause discontinuities.

Many thanks,

Gregzo

What is going on with this board? I see no answers to the OLD posts I’m interested in…

Somewhat related to this, is there any functionality in FMOD for lerping between values on its own that unity can access? If we had access to something like that, we could lerp the volume/pitch/parameters with a single call from the main thread and it wouldn’t be frame rate dependent, wouldn’t be brute force, would be more efficient and would have less issues when lerping quickly, or lerping at a low frame rate.

I’m not sure how it’s implemented in FMOD, but for G-Audio I’ve simply interpolated gain changes at audio buffer level so that setting a channel’s gain level never results in nasty pops.

I feel that they are trying to keep us from having to deal with threading issues, which really ends up being quite limitating… The dsp API should deal with that, we’ll see. For now, the API doesn’t allow setting audio parameters fron anything else than the main thread, which really just looks silly when you’re actually trying to do stuff from the audio thread, hummm…

Anyways, lots of great stuff in there, hopefully the API will open up before release.