0
0

Hi everyone,
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):
[code:jf0kyr3a]var
system: TFMODSystem;
begin
system := TFMODSystem.Create;
system.Init(...);
end;[/code:jf0kyr3a]

More information and an example is in the “fmod_wrapper.pas” file in this archive:
[b:jf0kyr3a]DOWNLOAD:[/b:jf0kyr3a]
[url:jf0kyr3a]http://reactor.reality-protocol.de/files/fmod_wrapper-0.1.zip[/url:jf0kyr3a]

  • You must to post comments
0
0

Thank you very much :)

  • You must to post comments
0
0

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:
[code:3frxv4k5]
procedure TMainForm.PopulateDevices;
var
DriverCount:integer;
Driver:integer;
name:PChar;
begin
cbxOutPutDevices.Items.Clear;
SoundSystem.GetNumDrivers(DriverCount);
if DriverCount>0 then
begin
for Driver:=0 to DriverCount-1 do
begin
SoundSystem.GetDriverName(Driver, name, 256);
cbxOutPutDevices.Items.Add(name);
end;
cbxOutPutDevices.ItemIndex:=0;
end;
end;
[/code:3frxv4k5]

Thanks in advance.

  • You must to post comments
0
0

Hi boteeka,
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]

greets,
stalnation

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.