Accessing VCA from code

Hi all,
does anybody know how to access VCAs from code?
Thanks, Salvo

Absolutely! That feature is already on our roadmap.

Hi Salvo,

If you know the VCA’s GUID, you can call Studio::System::getMixerStrip() to retrieve a runtime handle to it. Then simply use the Studio::MixerStrip API.

The tricky part is obtaining the GUID from the Studio tool. Currently there is no way to do this via the UI. What you must do is examine the project files on disk. Say you have a project called “GameProject”, and create a VCA called “MyVCA”. The main project folder will be called “GameProject”, containing the root project file, “GameProject.fspro”. You should see a sub-folder there called “Mixing Desk”.

[attachment=1]GameProject.jpg[/attachment]

Inside the “Mixing Desk” sub-folder, you should see a file that looks like “MyVCA {226eabc3-0568-40b0-b695-9bfdf9386df0}.vca”.

[attachment=0]Mixing Desk.jpg[/attachment]

That’s the GUID in curly braces. So in this example, the VCA’s GUID is “{226eabc3-0568-40b0-b695-9bfdf9386df0}”. At runtime you can use the helper function Studio::parseID() to convert this string to an FMOD_GUID type, suitable for passing to Studio::System::getMixerStrip().

Studio::System system;

...

FMOD_GUID id;
Studio::parseID("{226eabc3-0568-40b0-b695-9bfdf9386df0}", &id);

Studio::MixerStrip myvca;
system.getMixerStrip(&id, FMOD_STUDIO_LOAD_BEGIN_NOW, &myvca);

myvca.setFaderLevel(0.5f);

Cheers,
Graeme.

Hi Graeme,
Could the GUID and the name be obtained like a normal mixer group from the UI in a future release?
Thanks again, Salvo