![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
|||
|
|||
|
Te paso algo de codigo en un playlist que hice donde tempfile es un mediaplayer
procedure TMainForm.btnFileClick(Sender: TObject); const CrossFadeTime = 2500; {ms} var NewItem: PListItem; Pos,Len: Longint; i: integer; begin if OpenDialog.Execute then begin for i := 0 to OpenDialog.Files.Count-1 do begin TempFile.FileName := OpenDialog.Files[i]; Len := TempFile.FileLength; if (PlayList.Count > 0) then with PListItem(PlayList[PlayList.Count-1])^ do Pos := Max(Position+Length-CrossFadeTime,0) else Pos := 0; New(NewItem); with NewItem^ do begin FileName := TempFile.FileName; Length := Len; Position := Pos; end; PlayList.Add(NewItem); PlayListBox.Items.Add(NewItem.FileName+'|'+TimeToString(Pos)+'|'+TimeToString(Len)); end; end; end; |
|
|
|