0
0

The following code worked well for me in version .04, but breaks in .06. By break, i mean it returns ERR_INVALID_PARAM

[code:2f4znupt]rcode = _system.playSound((FMOD.CHANNELINDEX)_ch1, _stream1, true, ref _channel1);
[/code:2f4znupt]

my parameters are:

ch1 == 0, _stream1 == a valid stream returned from _system.createStream()

the stream was created w/ MODE.DEFAULT | MODE.SOFTWARE (software because i add a dsp later on)

ive also tried using FMOD.CHANNELINDEX.REUSE and .FREE

the url is valid and ive tried a flac and an mp3

the fmodex.dll w/ version 0.4.0.31 and 0.4.1.4 work. version 0.4.1.6 does not. im getting the version info by right clicking on dll, and selecting properties. all i have to do is drop in older dll and it works fine.

what am i doing wrong? how can i debug this?

  • You must to post comments
0
0

the problem goes away if i stop creating 2 of the same dsp…

im using the gain dsp to do cross fading.. so on startup, i do this:

[code:1q14zf19] FMOD.PLUGINTYPE type = FMOD.PLUGINTYPE.DSP;
int gainidx = 0;
rcode = _system.loadPlugin("dsp_gain.dll", ref type, ref gainidx);
if (rcode != FMOD.RESULT.OK) {
throw new Exception("error loading plugin: " + rcode.ToString());
}
rcode = _system.createDSPByIndex(gainidx, ref _gain1);
if (rcode != FMOD.RESULT.OK) {
throw new Exception("error creating dsp plugin: " + rcode.ToString());
}
rcode = _system.createDSPByIndex(gainidx, ref _gain2);
if (rcode != FMOD.RESULT.OK) {
throw new Exception("error creating dsp plugin: " + rcode.ToString());
}[/code:1q14zf19]

and then later i add _gain1 and _gain2 using channel.addDSP()

if i comment out that second createDSPByIndex(), the problem goes away.

This is not the stock gain dsp, i have modified it so it doesnt use a global internally

  • You must to post comments
0
0

actually, there is something screwier going on here.. if i comment out the second createDSPByIndex(), the playsound works, but the adding of the first DSP fails.. i get a null exception:

[code:3ooxgbs4]System.NullReferenceException: Object reference not set to an instance of an object.
at FMOD.Channel.FMOD_Channel_AddDSP(IntPtr channel, IntPtr dsp)
at FMOD.Channel.addDSP(DSP dsp) in fmod.cs:line 2978
at MyPlayer.PlayUrl(String url, Single gain) in mycode.cs:line 356[/code:3ooxgbs4]

i have printed out the values of

channelraw & dsp.getRaw() for this function:

[code:3ooxgbs4] public RESULT addDSP(DSP dsp)
{
return FMOD_Channel_AddDSP(channelraw, dsp.getRaw());
}[/code:3ooxgbs4]

in fmod.cs, and both are non-zero.

once again, all of these problems go away with the .04 version of the dll

  • You must to post comments
0
0

i can reproduce this bug using stock examples!

open the dsppluginviewer.exe, load 2 of the same plugin, dont need to activate either, and try to play a song.. it will blow up.

i tried 2 echo plugins and jaguar.wav

some of the dsps dont seem to have an issue, some do

  • You must to post comments
0
0

happens w/ mp3 for me as well.. flac too!

are you picking directsound when it comes up?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.