hi habe eine playlistbox, nun wenn ich das programm starte und die list box mit waves zum spielen bestücke wird mir der balken welches gerade gespielt wird nicht mehr angezeigt:Butten play click :
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
| procedure TMainForm.ButtonPlay1Click(Sender: TObject); begin Stopping := False; CTimer1.Enabled := True; PlayIndex := 1; s:= PlayListBox.Items[PlayIndex]; p:= pos(':\',s)-1; s:= copy(s,p,length(s)-p+1); WaveFile1.Wave.FileName := s; inc(PlayIndex); try WaveOut.Start;
except WaveOut.Stop; Stopping := True; end; end; |
neuen eintrag einlesen :
Quelltext
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:
| procedure TMainForm.WaveOutClose(Sender: TObject); begin if Stopping then exit;
s:= PlayListBox.Items[PlayIndex]; p:= pos(':\',s)-1; s:= copy(s,p,length(s)-p+1); WaveFile1.Wave.FileName := s; if PlayIndex < PlayListBox.Items.Count then begin WaveFile1.Wave.FileName := s; s:= PlayListBox.Items[PlayIndex]; inc(PlayIndex); if (PlayListBox.ItemIndex<>-1) then MainForm.Close else
try WaveOut.Start; except WaveOut.Stop; Stopping := True; MainForm.Close; end; end; end; |
ich hoffe es kann mir jemand helfen
ciao
Glauben heißt nichts wissen ...