Maybe it is my luck running out or I am missing something but I keep getting "ERR_INVALID_PARAM" results back no matter what I do or change.

I downloaded FMOD, latest release, uploaded and compiled the C# source and started the examples in the documentation. The code below has been changed many many times and tested in many different ways in WinForm / WPF

using Sys = FMOD.System;
class Program
static RESULT result;
static Sys _Engine = null;
static Sound sound = null;
static Channel channel = null;

    static void Main(string[] args)

        _Engine = new Sys();
        sound = new Sound();
        channel = new Channel();

        result = _Engine.init(200, INITFLAGS.NORMAL, IntPtr.Zero);
        result = _Engine.createStream(@"Test.mp3", MODE.DEFAULT, ref sound);
        result = _Engine.playSound(CHANNELINDEX.FREE, sound, false, ref channel);

Now this may not look similar to the the example in the docs, it has jumped from a WinForm app, to a WPF app to a Console app with many variables changed, I cant stress how many times this has been changed, with loops added, removed (for the sake of update).


EDIT: Turns out making a new instance of result returned the correct result, however no sound is being played :/

  • You must to post comments

I am known for 2 things in real life, one for being an insomniac and the other,.. well we wont talk about that here.

Turns out this is one of those ’embarrassing’ programming times when a simple thing gets missed out of code and as a result nothing works.

Doing a lot of DirectX work, naturally the word ‘create’ usually ends up meaning ‘new’ as a result I forgot to create a factory.system_create which of course prevented any sound at all, I literally was banging my head just now after I spotted it.

On the plus side I now know what half of the modes mean 😀

Anyway feel free to close / delete this thread, I found the error and I indeed have sound

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.