0
0

Greetings,
I downloaded the official C# wrapper for FMODex and am trying it out with a windows form. But I seem to always get the same error "An invalid parameter was passed to this function." When initialising FMOD.

[code:3aimpxff]private void Form1_Load(object sender, EventArgs e)
{
FMresult = FMSYS.setSpeakerMode(FMOD.SPEAKERMODE.STEREO);
TextBoxA.AppendText(FMOD.Error.String(FMresult));

        FMresult = FMSYS.setSoftwareChannels(100);
        TextBoxA.AppendText(FMOD.Error.String(FMresult));

        FMresult = FMSYS.init(100, FMOD.INITFLAGS.NORMAL, new IntPtr(0));
        TextBoxA.AppendText(FMOD.Error.String(FMresult));

        //TextBoxA.AppendText(ToString(Properties.Resources.kick));

        FMresult = FMSYS.createSound("kick.mp3", FMOD.MODE.SOFTWARE, ref mySound);
        TextBoxA.AppendText(FMOD.Error.String(FMresult));
        //FMOD.Error.String 
        //TextBoxA.AppendText();
    }

[/code:3aimpxff]

I suspect I’m getting something really simple wrong but as I’m unable to find any documentation or examples for the wrapper I have no idea! Please, how do I load a sound correctly using the wrapper?

PS: also any links to tutorials or examples for the wrapper would be greatly appreciated, thanks

  • You must to post comments
0
0

Turns out I didn’t use the factory!
How very silly, seems to work pretty well so far.
For loading sounds, using "./Resources/~filename~" as the string works fine with the standard resource system in visual c# express.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.