0
0

Hallo,

I use FMOD in Delphi. When I create a stream, play it with:
FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, False, channel);

then stop it with:
result := FMOD_Channel_Stop(Channel);

then play it again with
FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, False, channel);

then I first hear a noisy sound (about 200 ms) as if it first plays a part of the last data in buffer.

I initialize with:
procedure TForm1.FormCreate(Sender: TObject);
var FileName: String;
begin
result := FMOD_System_Create(system);
if result <> FMOD_OK then exit;

result := FMOD_System_GetVersion(system, version);
if result <> FMOD_OK then exit;

if version <> FMOD_VERSION then ;
exit;

result := FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0);
if result <> FMOD_OK then exit;

Filename := ‘t1.wav’;
result := FMOD_System_CreateSound(system, pChar(FileName), FMOD_CREATESTREAM, 0, sound);
if result <> FMOD_OK then exit;

FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF);
FMOD_Sound_GetLength(sound, LengthMS, FMOD_TIMEUNIT_MS);
FMOD_Channel_SetMode(channel,FMOD_CREATESTREAM);
FMOD_Channel_SetMode(channel,FMOD_LOOP_OFF);
end;

Can somebody help?

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.