Einzelnen Beitrag anzeigen

rene50

Registriert seit: 17. Sep 2012
3 Beiträge
 
Delphi 4 Standard
 
#15

AW: Re: Und nochmal 2 Sounds Gleichzeitig abspielen...

  Alt 2. Aug 2013, 20:35
von Swissdelphicenter.com:
Delphi-Quellcode:
uses
  MMSystem;

procedure SendMCICommand(Cmd: string);
var
  RetVal: Integer;
  ErrMsg: array[0..254] of char;
begin
  RetVal := mciSendString(PChar(Cmd), nil, 0, 0);
  if RetVal <> 0 then
  begin
    {get message for returned value} 
    mciGetErrorString(RetVal, ErrMsg, 255);
    MessageDlg(StrPas(ErrMsg), mtError, [mbOK], 0);
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  SendMCICommand('open waveaudio shareable');
  SendMCICommand('play "C:\xyz\BackgroundMusic.wav"');
  SendMCICommand('play "C:\xyz\AnotherMusic.wav"');
  SendMCICommand('close waveaudio');
end;
Hi, danke für den Tipp, aber kann man einen Laufenden Ton denn auch wieder stoppen?
René
  Mit Zitat antworten Zitat