0
0

Hello!

I have been using FMOD for a few days now and everything is running really smooth. We set up a test scene with alot of vehicles and aircraft, and it sounds great, beyond expectations.

The problem is that as soon as we add DSP’s (which is the biggest reason we tried out FMOD) it starts to sound bad, really bad. One sound that is far away and very low on volume suddenly kicks in at full volume, replacing one of the sources that are very close for a brief period, then switches back.

Here are our settings for initliazing FMOD:
[code:3ros6xe1]
system->setDSPBufferSize( 1024, 8 );
system->setSoftwareFormat( 48000, FMOD_SOUND_FORMAT_PCM16, 2, 2, FMOD_DSP_RESAMPLER_SPLINE );
system->init( 128, FMOD_INIT_NORMAL, 0 );
[/code:3ros6xe1]

Min/Max distances are default, and we create the sounds with the following parameters:
[code:3ros6xe1]
FMOD_LOWMEM
FMOD_3D
FMOD_LOOP_OFF
FMOD_SOFTWARE
FMOD_CREATESAMPLE
[/code:3ros6xe1]

As I said, as long as we skip any DSP effects the sound is perfect.
We have limited our FPS with vertical sync, we have tried different intervals of running update() and we have updated drivers for all three computers (SBLive!, Audigy, Xfi). FMOD CPU usage is peaking at 4-5 percent and we have tried to fiddle around with the DSP buffersize.

Is this to be expected with software mixing like this? Any suggestions?

  • You must to post comments
0
0

when you specify 2 outputchannels in setSoftwareFormat, you are telling it to go into FMOD_SPEAKERMODE_RAW which means 3d sound is ignored

You should leave it at 0, take a closer look at the documentation for that function.

I wouldnt recommend touching dsp size at all, and same with software format unless you really have the need to use spline interpolation instead of the default.

  • You must to post comments
0
0

Thanks Brett, I appreciate it.

I am afraid none of that made it better, though. And how come it still works without DSP’s? The sounds that are far away behave like they have highest priority and kick out the sound which is closer, eventho I am still only using 4 voices.

I did as you asked me, and corrected some of my mistakes:
[code:14fe9ikm]
system->setDSPBufferSize ( 1024, 4 );
system->setSoftwareFormat ( 48000, FMOD_SOUND_FORMAT_PCM16, 0, 6, FMOD_DSP_RESAMPLER_LINEAR );
[/code:14fe9ikm]

Here’s how I assign my DSP effects:
[code:14fe9ikm]
// When FMOD has initialized
system->createDSPByType ( FMOD_DSP_TYPE_LOWPASS, &lowpassFilter );

// Immediatly after the sound has been played
float cutoff = 5000 – ( distance * 6 );
lowpassFilter->setParameter ( FMOD_DSP_LOWPASS_CUTOFF, cutoff );
channel->addDSP ( lowpassFilter );
[/code:14fe9ikm]

They all share this one:
[code:14fe9ikm]
protected:
FMOD::DSP * lowpassFilter;
[/code:14fe9ikm]

Something just striked me. Do I need a seperate DSP for each channel?

  • You must to post comments
0
0

You can still hear sounds far away for a brief millisecond after they are played, but I guess it’s no big deal. I got a new error with playing one DSP per channel, though – after playing 20 sounds per second for about 6 seconds.

[quote:y1pm935j]
FMOD error! (16) DSP connection error. Couldn’t find the DSP unit specified.[/quote:y1pm935j]

And it never goes away :) Just keeps popping up when I am trying to play a new sound, yet the sound is never heard.

Edit: Ok nevermind I found it. I was calling setDelay (of 1000!) after each sound had been played which obviously was the culprint there. I still think it’s harsch to not be able to play again at all, but it’s no big deal now that I have got around it :)

I am now playing 1000 sounds per second, with lowpass/normalize DSP’s attached to each one, and apart from that our game crawls at a mere 7 fps, (which is to be expected :D), no sound artifacts can be heard and the audio is really stable.

I think you guys will see a new customer soon. This evauluation has been very entertaining. Laters and thanks again.

  • You must to post comments
0
0

hah ok that makes sense i suppose 😆

good to see you are going again. Note if you want to do an effect to lots of channels at once you can use ChannelGroups and it will improve the cpu usage a lot (thanks to submixing and the effect only being processed once, not for every voice)

  • You must to post comments
0
0

I am applying lowpass depending on range to the source, would the above even be an option then?

  • You must to post comments
0
0

no that is per source.

FMOD already has a built in lowpass like this. You can use FMOD_INIT_OCCLUSION_LOWPASS i think it is called, then use setOcclusion function to change its level.

You can do it your way too, this way just works better with virtual voices and is built in so there is less code.

  • You must to post comments
0
0

Do I have to feed the geometry engine with data, to be able to use the lowpass effect you mentioned? Reason to me asking is that I tried to use it without feeding any data and all I got was silence.

  • You must to post comments
0
0

No, you don’t have to feed it with data.

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.