views:

52

answers:

1

I'm trying to use fmodex 4.30.03 to play an MP3 file under Mono/Ubuntu.

My call to createSound() looks as follows:

result = system.createSound(path, 
    (FMOD.MODE._2D | FMOD.MODE.HARDWARE | FMOD.MODE.CREATESTREAM), 
    ref sound);

as per the C# examples that come with the SDK.

result is being set to 19, ERR_FILE_BAD.

The same thing works fine under Windows. I have the following in app.config:

<dllmap os="linux" dll="fmodex" target="./libfmodex-4.30.03.so"/>

If this isn't present, fmodex never even gets loaded, so I know it's getting so far.

The file I'm passing in definitely exists, but if I pass an invalid path I actually get the same error message.

+2  A: 

I'm assuming you managed to get the FMOD system initialized and everything. The C# wrapper passes strings through to FMOD for createSound as unicode which FMOD doesn't support on Linux. To fix this you will need to alter the C# wrapper, remove the FMOD_UNICODE flag being passed in and ensure the strings being fed into FMOD are normal ASCII.

Mathew Block
Thanks - I posed on their forum and got this answer, which worked fine.
tomfanning