I created a FMOD Ex Wrapper Unit for Delphi.
It replaces the FMOD_SYSTEM, FMOD_SOUND etc…
objects with classes called TFMODSystem, TFMODSound etc…
Just like you know it from the C++ interface.
But you have to create these classes before you use them (just like you normally do it in Delphi):
system := TFMODSystem.Create;
More information and an example is in the “fmod_wrapper.pas” file in this archive:
- stalnation asked 11 years ago
Hi, I am trying to write some simple mp3 player program in Delphi 2005 using this wrapper. I wrote a procedure to enumerate the output devices, but the program crashes when this procedure gets called. I don’t understand why. The problem is with the GetDriverName function. Please help me out with this.
Here’s the procedure:
if DriverCount>0 then
for Driver:=0 to DriverCount-1 do
SoundSystem.GetDriverName(Driver, name, 256);
Thanks in advance.
- boteeka answered 11 years ago
the problem of your code is not FMOD Ex’s or FMOD Ex’s wrappers fault.
You made a common mistake (i think, because i make it often too ;))
you declared the variable name in this way: [quote:2j96rfyp]name:PChar;[/quote:2j96rfyp]
indeed FMOD Ex wants a PChar, but your variable name points to nothing (nil).
your code works when you declare the variable name in this way:
[code:2j96rfyp]name: array[0..255] of char;[/code:2j96rfyp]
- stalnation answered 11 years ago
Please login first to submit.