Hola, tengo el siguiente codigo de delphi 6:
Código Delphi
[-]
type
HMSRec = record
Hours: byte;
Minutes: byte;
Seconds: byte;
NotUsed: byte;
end;
If OpenDialog1.Execute then begin
Label16.Caption := OpenDialog1.FileName;
MediaPlayer1.FileName := OpenDialog1.FileName;
MediaPlayer1.Open;
MediaPlayer1.Rewind;
MediaPlayer1.TimeFormat := tfHMS;
TheLength := MediaPlayer1.Length;
with HMSRec(TheLength) do
begin
Label17.Caption := IntToStr(Hours);
Label17.Caption := Label17.Caption+'H ' + IntToStr(Minutes) + 'M ';
Label17.Caption := Label17.Caption+ IntToStr(Seconds)+ 'S ';
end;
end;
Y cuando selecciono un archivo MP3 el tiempo no lo hace bien, el fichero lo reproduzco con el VLC, por ejemplo y esta bien y la duracción que dice si es real, pero en este codigo, sacado de la ayuda, da unos valores muy diferentes.
Que estoy haciendo mal???
Gracias