How to get microphone input event

For a VR training application I need to route a microphone input through Resonance Audio with as short a latency as possible. We’re using Unity. It seems FMOD Studio does not support external audio input, and I haven’t the foggiest idea how I could get the API to work for me. Any leads, help is greatly appreciated!

Jorick

FMOD does support recording although it requires the use of the Core API. We also have a code example included in the FMOD API download.

To use this in a Studio Project you would need to play it through a Programmer Instrument, see also the Unity example for Programmer Sounds.

Hey Cameron,
Thanks for this valuable piece of info. I’ve seen the API examples before, but could find out for the life of me where to put or how to use this example. I’ll let you know when I get stuck. :wink:

Jorick

Hey Cameron,

I think the record example does exactly what I need, apart from the “just for fun” reverb. But I think I’ll be able to tear that out myself. Maybe I’ll test with decreasing the latency a bit.

I’ve tried some things but made very little progress, since CPP is quite outside my comfortzone, I have not gotten it to work yet.
So here are some basic questions that I think are keeping me from success.
If I understand correctly, I need to put the record.cpp example as a script in the unity project.
How do I link the script to the Studio Event?
Does it matter where in the unity project I place the script?
Is the DEVICE_INDEX used to select which external audio device is used? Is there a way to set which input channel to use?

Unfortunately it’s not as simple as adding the record.cpp to the Unity project. You will need to manually implement what you need from the cpp into your own CS script.

That is correct, you can see more information in the docs: System::getRecordDriverInfo.

Ok. Well, I guess that’s where it ends for me then. If I understand correctly this means translating code from one language to another, both of which I really can’t work with or will take me weeks to master.

I assume it’s already on the feature-request list to have this function integrated in the FMOD Studio environment?

Currently there are just too many different ways that recording can be used to remove the need for coding, although having a C# example (for all examples really) is probably a good place to start.

We do have plans to add recording to the Studio API, but do not have an ETA at this point.

I would agree with that being a very good place to start.
I’ve been trying to find a programmer who can translate the example to fit our needs, yet unsuccessfully. Our current programmer is unable to do it, since he is a Unity coder.
Meanwhile we’re working on borrowed time with this project.
Is there a way I can receive an update somewhere once theres C# examples?