• 关闭声道


    uses MMSystem;

    procedure SetMediaAudioOff(DeviceID : word);
    var
     SetParm : TMCI_SET_PARMS;
    begin
      SetParm.dwAudio := MCI_SET_AUDIO_ALL;
      mciSendCommand(DeviceID,
                     MCI_SET,
                     MCI_SET_AUDIO or MCI_SET_OFF,
                     Longint(@SetParm));
    end;

    Procedure SetMediaAudioOn(DeviceID : word);
    var
     SetParm : TMCI_SET_PARMS;
    begin
      SetParm.dwAudio := MCI_SET_AUDIO_ALL;
      mciSendCommand(DeviceID,
                     MCI_SET,
                     MCI_SET_AUDIO or MCI_SET_ON,
                     Longint(@SetParm));
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
     {Play AVI file silently}
      MediaPlayer1.FileName := 'C:TheWallDELCAR2.AVI';
      MediaPlayer1.Display := Panel1;
      MediaPlayer1.Open;
      MediaPlayer1.Play;
      SetMediaAudioOff(MediaPlayer1.DeviceId);
    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
     {Play AVI with sound}
      MediaPlayer1.FileName := 'C:TheWallDELCAR2.AVI';
      MediaPlayer1.Display := Panel1;
      MediaPlayer1.Open;
      MediaPlayer1.Play;
      SetMediaAudioOn(MediaPlayer1.DeviceId);
    end;

  • 相关阅读:
    js+分布上传大文件
    java+大文件断点续传
    word粘贴图片到ekitor
    ckeditor从word粘贴图片
    word粘贴图片到ckeitor
    2g 大文件上传
    php+大视频文件上传+进度条
    java+Word图片上传控件
    断点续传管理系统
    富文本编辑器粘贴复制Word
  • 原文地址:https://www.cnblogs.com/yzryc/p/6374875.html
Copyright © 2020-2023  润新知