Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 22.07.05 13:34 
Hallo, wie kann ich beim Mediaplayer anzeigen lassen, an welcher Position er sich gerade befindet, zB so:

00:01:25 / 00:04:21

:?:


Danke schonmal :wink:
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: Fr 22.07.05 13:51 
mit mp.length und mp.position
das sind die werte in ms

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 22.07.05 13:53 
ja das weiß ich auch, aber wenn ich das in nen timer mache, ruckelt die musik wie sau und das soll ja sekündlich aktualisiert werden, die abfrage schluckt ganz schön die ressourcen vom media player (außerdem hab ich immer noch nicht die umrechnung von sekunden / millisekunden in HH:MM:SS geschafft, obwohl meine rechnung stimmt :( )
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: Fr 22.07.05 14:08 
soso. also ich mach das auch in nem timer, und das ruckelt kein bischen. allerdings frag ich auch immer nur mp.position ab
ausblenden Delphi-Quelltext
1:
2:
j := mp.position;
LabelEffect3.caption := zweistellen((j div 1000) div 60)+':'+zweistellen((j div 1000) mod 60);

zweistellen hängt ne null vorne an, wenn die zahl < 10

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 22.07.05 14:11 
danke, werd's testen :D
patrick dee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 311

Win 98SE, WinXP
D3,D6
BeitragVerfasst: Fr 22.07.05 14:14 
Hi

ich mache das so ohne das es ruckelt :

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.LaufzeitTimerPlayer1Timer(Sender: TObject);
Const TimeFactor = 1/24/60/1000;
begin
  PosPlayer1.Caption    := TimeToStr((Audioplayer1.position) * TimeFactor);
  RestPlayer1.Caption  := TimeToStr((Audioplayer1.wave.Length - Audioplayer1.wave.position) * TimeFactor);
end;
end;


ciao

patrick

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt.

_________________
Glauben heißt nichts wissen ...
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 22.07.05 14:34 
danke, funzt soweit :D