FSOUND FX API

Introduction         
Limitations         
Using it         
FX on the 'output' channel.         
    This is a special feature which allows you to enable effects on the output result of the software mixed channels!
    If you specify FSOUND_INIT_ENABLESYSTEMCHANNELFXX in the flags field of FSOUND_Init.
    The channel ID to use for altering the output result is FSOUND_SYSTEMCHANNEL. Call FSOUND_SetPaused on this to enable effects. This will stop all software mixed sound effects.
FSOUND_FX + Spectrum and DSP?.         
    To use the FSOUND_FX api to do fx on channels requires FSOUND_HW2D or FSOUND_HW3D (and FSOUND_ENABLEFX) flags to work.
    You may notice if you do this, you will lose the ability to do FSOUND_DSP_GetSpectrum or any DSP unit will not register, because FSOUND_FX channels play in hardware, and don't run through the FMOD DSP Engine.

    There is a way to do this though. Instead of performing EQ on a channel by channel basis, perform it on the global software mix output.

    This means you can't have per channel control, but if you are just looking for a way to do EQ on your audio for example, then use the following method.

  • Call FSOUND_SetBufferSize(100); When you call FSOUND_Init with FSOUND_INIT_ENABLESYSTEMCHANNELFX (see step 2) you will need a big enough software engine buffer to allow FX to be processed. FMOD defaults to 50 which is too small. This is a limitation of DirectSound and needs to be taken care of.
  • Use FSOUND_INIT_ENABLESYSTEMCHANNELFXin FSOUND_Init. This will ready the software engine output to have the FX api used on it.
  • Pause the software engine. You always need to pause the source when using FSOUND_FX_Enable (see step 3), so call FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, TRUE);
  • Call FSOUND_FX_Enable to create all your FX handles (EQ, distortion whatever).
  • Unpause the software engine. FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, FALSE);
  • Now you are ready! Create streams and sounds in software mode (FSOUND_NORMAL - don't use FSOUND_HW2D or FSOUND_HW3D)

    Now that all your sounds and streams are in software, you get spectrum analysis back, and also you can use the DSP engine for your own software processing or oscilliscope plotting - with the added benefit of FSOUND_FX processing!