Autor Beitrag
bernd29
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116

winxp
D7 und VB6
BeitragVerfasst: Mi 30.03.05 22:30 
Hi Leute ,:wave:

ich hab folgendes problem mein player läuft soweit ganz gut nur benutze ich zum laden meiner mp3 open dialog nun will ich opendialog ersetzen durch eine playlist könnte sich jemand mal meinen code anschauen und mir sagen wie ich ihn verändern müsste.

ausblenden volle Höhe Delphi-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:
27:
28:
29:
30:
31:
procedure TMainForm.btnOpenClick(Sender: TObject);
begin
   if Opendialog.Execute then
   begin


      if not LoadFile(OpenDialog.FileName) then
         MessageDlg('This is not a valid Audiofile',mtWarning, [mbOK],0);

      SetFileParams;
   end;
end;
//*************************************************************************
function TMainForm.LoadFile(FileName: TFileName): Boolean;
begin
   Result := False;
   if (FileName <> '') and FileExists(FileName) then
   begin
      Player.FileName := '';

      if IsPLAYER(FileName) then
      begin
         Player.FileName := FileName;
         CurTime := 0;
         OldTime := 0;
         Result := True;
      end;
   end;
   SetFileParams;
end;
//**************************************************************************


SetFileParms ist uninteressant da dort nur die mp3 tag ausgelesen wird

gruss bernd
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 30.03.05 22:44 
in der delphi-praxis gibt es mindestens 5 open source mp3 player. schau dir an wie die das gemacht haben oder denk dir selber was aus.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 31.03.05 07:49 
naja, so schwer ist das ja auch nicht. Du packst einfach in eine Liste ein paar Dateinamen und wenn du einen auswählst, dann spielst du den ab.

_________________
We are, we were and will not be.
bernd29 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116

winxp
D7 und VB6
BeitragVerfasst: Do 31.03.05 07:57 
hi leute,

geht jetzt. :dance:

gruss bernd