Hi
in deinem Code sind einige Fehler!
es muss
BASS_SYNC_END
or BASS_SYNC_ONETIME
@Sync_Crossfade);
nicht
BASS_Sync_OneTime
+ BASS_SYNC_POS, Sync_Crossfade);
hs_CF brauchst du nur in Verbindung mit dem Flag BASS_SYNC_MIXTIME
aus meinem Code
Delphi-Quellcode:
(* Frees all resources *)
if BASS_ChannelRemoveSync(fPlayChan, fSyncStall) then fSyncStall:= 0;
if BASS_ChannelRemoveSync(fPlayChan, fSyncFree) then fSyncFree:= 0;
(* Create Channel *)
fPlayChan:= BASS_StreamCreateFile(false, PWideChar(fFilename), 0, 0, sFlag or BASS_UNICODE);
(* Set Sync's *)
BASS_ChannelSetSync(fPlayChan, BASS_SYNC_END or BASS_SYNC_ONETIME, 0, @SongEndProc, nil);
fSyncStall:= BASS_ChannelSetSync(fPlayChan, BASS_SYNC_STALL or BASS_SYNC_MIXTIME, 0, @SongStalledProc, nil);
fSyncFree:= BASS_ChannelSetSync(fPlayChan, BASS_SYNC_FREE or BASS_SYNC_MIXTIME, 0, @SongFreeProc, nil);
versuche mal den Flag BASS_STREAM_AUTOFREE in Verbindung mit
s := BASS_StreamCreateFile (False, PChar(dateiname), 0, 0, flags);