![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Mediaplayer
Comrade © (2005-03-23 15:49:00)Как сделать так, чтобы по прослушиванию мелодии автоматически включалась другая(следующая) из списка в Filelistbox`e;
ronyn (2005-05-06 00:27:00) [1]Лично я так делал.
procedure TForm1.mp3playerNotify(Sender: TObject);
begin
if mp3player.Position=mp3player.Length then BitBtn1click(sender);
end;
//////
l:=1;
k:=mp3list.Count;
if BitBtn4.Enabled=false then l:=random(k)+3;
mp3List.ItemIndex:=mp3list.ItemIndex+1;
mp3player.Next;
mp3player.Open;
mp3File := Concat(txtFolder.Caption, mp3List.Items.Strings[mp3List.ItemIndex]);
FillID3TagInformation(mp3File, edTitle, edArtist, edAlbum, edYear, edGenre, edComment);
Progress.Max:=0;
mp3player.Close;
mp3player.FileName:=mp3File;
mp3player.Open;
mp3player.Play;
Progress.Max := mp3player.Length;
begin
if mp3Folder = '' then Exit;
txtFolder.Caption :=mp3Folder;
FillMP3FileList(mp3Folder, mp3List.Items);
end;
zero-g (2005-03-23 16:03:00) [2]Ловишь когда конец мелодии, потом запускаешь следующию :)