Hallo,
warum funktioniert folgene procedure nicht ?:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40:
| procedure TSound.LoadMusikFile(Index:Integer; RM:Boolean); var Datei:String; Music:TPlayListe; begin if RM = True then Music:=Random_Music[index] else Music:=PlayListe[index];
if PlayListe[Index].GetLoaddet = True then begin PlayMusikFile(index,False); Exit; end;
Datei:=Music.FileName;
Music.stream:=NIL; TSI; Music.Module:=FMUSIC_LoadSong(PChar(Datei) );
if Music.Module = Nil then Music.Stream := FSOUND_Stream_OpenFile(PChar(Datei), FSOUND_NORMAL, 0) else FMUSIC_SetLooping(Music.Module,False);
if (Music.Module = nil) and ( Music.Stream = NIL ) then begin Showmessage('ErrorTEST! Opening file - ' + FMOD_ErrorString(FSOUND_GetError())); FSOUND_Close(); Exit; end;
Music.GetLoaddet:=True;
if RM = True then Random_Music[Index]:=Music else PlayListe[Index]:=Music; end; |
vom qullcode her ist alles richtg.
fmod wird in der Create funktion von der TSound klasse aufgerufen !!!