Unity3 breaks FMOD Ex Usage?

Hi,

A while ago, I embedded the FMOD Ex lib into a Unity iPhone game for a client, and it now seems that since Unity3 includes FMOD itself, I can no longer init the fmod ex system, which breaks the app – but I can also not call any of Unity’s embedded fmod functions, either, so I’m in a little limbo.

Specifically, the fmod ex init fails:

FMOD::System_Create(&system);
system->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, 0);
// -- returns FMOD_ERR_OUTPUT_INIT

I can set the output to NOSOUND to work around this:

system->setOutput(FMOD_OUTPUTTYPE_NOSOUND);

But this prevents several API calls built into this particular app. I’ve tried multiple other output types and nearly every enum value that makes any sense, but to no avail.

I also tried the plugin approach, and bundled the fmod ex lib separately and linked it in to a standalone (non-iPhone) game as a test – still no dice.

I am not an expert with the fmod ex API, and it’s certainly possible that I am just missing something; I had to do some wacky stuff in the first place to get it working prior to Unity3. But has anyone managed to get Unity3 working correctly with an embedded version of FMOD Ex?

And/or can anyone point me to a doc or post somewhere explaining what fmod support is now unavailable/broken from a plugin lib perspective as a result of Unity3’s internal management of its own fmod lib?

Use of either FMOD or wWise with Unity should be documented somewhere; I can’t fathom that with all the other good stuff in Unity3 that it might not be possible at all, and I’m absolutely ready to chalk it up to my error.

Thx,
psn

What you can use of fmod is documented, thats the audio component and if you own pro, the filter.

But you have no low level access of any kind nor can you interact with the builtin fmod from plugins

To clarify:

I am not attempting to gain low-level access to anything in the Unity libs.

I am attempting to use the lib that I linked in myself – which worked fine prior to Unity3.

If you are saying that Unity3’s use of FMOD now prevents us from embedding our own fmodex lib in our own native code – even as a plugin for standalone projects – then this is a huge step backward.

I might be wrong on that but without low level access how can you hook the fmod ex part ontop of the integrated fmod?

if you can’t do that, wouldn’t there need to be 2 fmod contexts and some very ugly fights?

As far as I can tell you are at least partly correct: In fact you can re-init the fmod system successfully, and the lib reports success (not even hardware conflicts).

However, there clearly is some other conflict down the line (related to output in my case), and it seems that whatever that is should be familiar to someone out there. If it’s not, I will tinker with it a bit to try and figure it out, but I suspect that there is an audio engineer at Unity who knows more about this than I do and he/she should be able to say exactly what is now broken. I’m hopeful because it’s not outright broken, at least according to the fmod result codes and my debug watches.

As an aside, I recognize that the filters, C#/JS api additions and editor audio improvements are nice for some basic game audio cases, but if they come at the cost of being able to use common audio middleware (which was possible in the last release), those “improvements” would be a real blow to more advanced audio work. I’m not even talking about using designer, btw – this really is not a fancy use case.

I’m pretty sure there is some way to make it effectively work.
but its more work than just upgrade a project as you are no longer in the situation where only OpenAL was present, there is now a fmod already …
Unhappily my experience with fmod is restricted especially when it comes to fmod ex, so I guess a more audio focused programmer or a UT dev has to bring up additional ideas other than “see if fmod ex can be tought to talk to the unity integrated audio session”.

oh and just to ensure: forget to set the ipod override flag in the player settings if you intend to use hw decoder (see release notes RC1)

Any updates on this behavior? How can we use FMOD Ex functions in Unity 3.x on iPhone?

Thanks.

You can’t

The behavior wasn’t updated, the next larger release hasn’t happened yet either and its especially no bug

@Dreamora
Hi, I’ve been asked to add microphone functionality into our current Unity iPhone app (it would be constantly monitoring volume changes e.g. blows into the mic, during gameplay). Been scanning the forums and it was looking like I’d need to have a go at using fmod to achieve this but am I right in saying that this will no longer be possible due to the discussed fmod-ex issue? Would you or anyone know of an alternative way to achieve this mic-monitoring within Unity 3.x ?

Thanks for any help.