Does anybody know how to use the LowPass, Re/Preverb and Echo functions in Delphi 6.0? I can’t “port” the VB samples into Delphi because i don’t code in VB (I don’t understand exactly the procedures in this examples). Who can “port” these procedures into a Delphi code or give an example on how to use these effects via the DSP chain…?!?
ThanX in advance…
- UnKn0wN asked 17 years ago
The VB DSP examples are based on KarLKoX’s helper dll. Very nice too from what I can see.
You could do the same thing, and create a unit (like FMOD.PAS) that wrapps the functions of the dll. Theoretically it should work. I’m not sure exactly how or if you could intergrate it into a callback, I think thats what the dll does, as a bridge.
Functions in the VB code like InitDSP are actually mapped via the dspfx.bas file to the extrenal dll. You could look at that file and it may help you.
I know what your going through, I’m trying to figure out some C++ code, and I’m having a heck of a time.
Anyway, good luck.
Why can’t access directly the functions in the FMOD.dll? I don’t know the functions which allows to use these effects, but they’re implemented in the DspFx.dll… Which are the functions used in DspFx.dll, so I can use them directly on the FMOD.dll, without using a 2nd external DLL…
Ok, I looked into this and after studying the MAIN.C file (use notepad to view) under the Samples/FMOD directory, I think that the Low-Pass filter is done in code. I can’t be sure of this as I don’t read C++ code that well, but I did try.
FMOD will do reverb, but you need to setup the effect with the proper variables :
FSOUND_FX_SetI3DL2Reverb(fxid, Room, RoomHF, RoomRolloffFactor, DecayTime, DecayHFRatio, Reflections, ReflectionsDelay, Reverb, ReverbDelay, Diffusion, Density, HFReference);
Then enable the reverb :
And of course, you must have a DirectSound certified sound card and driver for this to work, and you must have DirectX 8.
That should do the reverb, for the low-pass you’ll need to convert from the C++ code as mentioned above.
Hope this helps.
One thing to clarify is that DSP FX can’t be hard coded in VB due to the calling convention problem (_cdecl is not supported, only _stdcall). Though, i took Brett’s code and wrapp it into a simple DLL. FMOD have also some FX functions, but here, they work differently. Brett intended to show how to code whatever FX you want with a DSP Callback. Others FMOD FX works differently and are based on other API like EAX, DirectSound3D or A3D (obsolete and removed). Though, if the FMOD internal FX are enough, don’t matter about DSP. Otherwise, this DLL show you how to code an effect in C/C++ and export it for VB user. Delphi don’t have this limitation
Note : i found something strange dealing with _cdecl function with VB on the net, i m investigating 😉
Please login first to submit.