Ver Mensaje Individual
  #2  
Antiguo 16-06-2012
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola sbraceras y bienvenido a Club Delphi

Una opción es usar la función mciSendString.

Ejemplo:
Código Delphi [-]
...
implementation

{$R *.dfm} {$R Recurso.res}

uses MMSystem;

procedure TForm1.FormCreate(Sender: TObject);
var
  RStream: TResourceStream;
  PathAndFile: string;
begin
  PathAndFile:= ExtractFilePath(Application.ExeName) + 'sound.mp3';
  RStream := TResourceStream.Create(HINSTANCE, 'sound', RT_RCDATA);
  try
    RStream.SaveToFile(PathAndFile);
    mciSendString('close media', nil,0, 0);
    mciSendString(PChar('open "' + PathAndFile + '" alias media'), nil, 0, 0);
    mciSendString('play media', nil, 0, 0);
  finally
    RStream.Free;
    DeleteFile(PathAndFile);
  end;
end;
...

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita