0
0

Hi
I want a small delphi example using the FMOD Ex.
Thanks

  • You must to post comments
0
0

Hello,

The Delphi files, needed to use FMOD are not yet checked completely I think. I have been making some small tests in Delphi with FMOD Ex and ran into some mistakes in fmod.pas. I think Brett too doesn’t want to spent to much time on the Delphi files until FMOD is almost 1.0.

What exactly isn’t working, maybe I can answer your question, or if you prefer write a very small demo which just plays files, but that will take about a week (very busy at the moment).

Greets

  • You must to post comments
0
0

Hi SpaceNuts, thanks for the answer.

[quote="SpaceNuts":3gtf9t6i]… or if you prefer write a very small demo which just plays files, but that will take about a week (very busy at the moment).[/quote:3gtf9t6i]

Yes, this is what I’m searching. I want an example like that in fmod 3.x. Thanks in advance.

cmstein

  • You must to post comments
0
0

This is a small program I converted from C example.
[code:28d8pjmt]
program PlayStream;

{$APPTYPE console}

uses
Windows, Classes, SysUtils,Fmod,FmodErrors,FModTypes;

procedure ERRCHECK(result:FMOD_RESULT);
begin
if (result <> FMOD_OK) then begin
writeln(’FMOD error! (’,ord(result),’) ‘,FMOD_ErrorString(result));
readln;
halt(1);
end;
end;

var
xsystem:FMOD_SYSTEM;
sound:FMOD_SOUND;
channel:FMOD_CHANNEL=nil;
result:FMOD_RESULT;
version:cardinal;
playing:longbool;

begin
result := FMOD_System_Create(xsystem);
ERRCHECK(result);

result := FMOD_System_GetVersion(xsystem, version);
ERRCHECK(result);

if (version < FMOD_VERSION) then begin
writeln(Format(’Error! You are using an old version of FMOD %.8x. This program requires %.8x’, [version, FMOD_VERSION]));
exit;
end;

result := FMOD_System_Init(xsystem, 32, 0, FMOD_INIT_NORMAL,nil);
ERRCHECK(result);

result := FMOD_System_CreateStream(xsystem, ‘test.oxm’, FMOD_NORMAL, nil, sound);
ERRCHECK(result);

result := FMOD_System_PlaySound(xsystem, FMOD_CHANNEL_FREE, sound, false, channel);
ERRCHECK(result);

repeat
Sleep(10);
FMOD_Channel_IsPlaying(channel, playing);
FMOD_System_Update(xsystem);
until not playing;

result := FMOD_Sound_Release(sound);
ERRCHECK(result);
result := FMOD_System_Close(xsystem);
ERRCHECK(result);
result := FMOD_System_Release(xsystem);
ERRCHECK(result);
end.
[/code:28d8pjmt]

[b:28d8pjmt]If you want to use FMOD_CREATESOUNDEXINFO structure defined in FMODTYPES.PAS watch out! There is a mistake and you have to switch fileoffset and filelength members.[/b:28d8pjmt]

  • You must to post comments
0
0

Im working with Delphi 6. I want to make something like dsppluginviewer example you provide with the api; i read the source code of the example and i notice that you call getSpectrum(spectrum…); where spectrum is a float array. In FMOD.pas this argument is just a simple single value an i use the function like this :
getSpectrum(system, spectrum, 0, 0, FMOD_DSP_FFT_WINDOW_RECT); but the result is INVALID_PARAMETER. If i put numvalues >=1 then an exception occurs. How can i get a spectrum analisis from FMOD.pas.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.