GARANTIR DESCONTO

Fórum Como usar o TMediaPlayer #181800

12/09/2003

0

Tenho um componente TMediaPlayer. Quando tento executar (ouvir) o arquivo de áudio, recebo o
seguinte erro: ´No MCI device open´.

O que estou fazendo de errado??



===============
Código:
===============
var
MP : TMediaPlayer;
Length : integer;
begin
MP := TMediaPlayer.Create(Self);
MP.Parent := Self;
MP.Visible := false;
MP.TimeFormat := tfHMS;
MP.FileName := ´C:\98.wav´;
Length := MP.Length;
LabelTempo.Caption := IntToStr(HMSRec(Length).Hours)+´:´+IntToStr(HMSRec(Length).Minutes)+´:´+IntToStr(HMSRec(Length).Seconds);
MP.Play;
end;



Grato,
Marcos


Atomix

Atomix

Responder

Posts

12/09/2003

Dhiogo

Vc esqueceu de abrir a midia.
var
MP : TMediaPlayer;
Length : integer;
begin
MP := TMediaPlayer.Create(Self);
MP.Parent := Self;
MP.Visible := false;
MP.TimeFormat := tfHMS;
MP.FileName := ´C:\98.wav´;
mp.Open; [color=red:18ef58a800][b:18ef58a800] Faltou isso [/b:18ef58a800][/color:18ef58a800]
Length := MP.Length;
LabelTempo.Caption := IntToStr(HMSRec(Length).Hours)+´:´+IntToStr(HMSRec(Length).Minutes)+´:´+IntToStr(HMSRec(Length).Seconds);
MP.Play;
end;


Responder

Gostei + 0

06/04/2019

Paulo Abrantes

tem como dar play em um endereco web tipo uma radio web , um stream ?
Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar