AudioConfig.pas
上传用户:mjqmds
上传日期:2022-05-05
资源大小:2827k
文件大小:2k
源码类别:

DirextX编程

开发平台:

Delphi

  1. unit AudioConfig;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, TFlatButtonUnit, LMDCustomControl, LMDCustomPanel,
  6.   LMDCustomTrackBar, LMDTrackBar, TFlatSpeedButtonUnit, StdCtrls, ExtCtrls;
  7. type
  8.   TAuForm = class(TForm)
  9.     LMDTrackBar4: TLMDTrackBar;
  10.     Bevel1: TBevel;
  11.     Image1: TImage;
  12.     Image2: TImage;
  13.     FlatSpeedButton2: TFlatSpeedButton;
  14.     FlatSpeedButton3: TFlatSpeedButton;
  15.     procedure FormShow(Sender: TObject);
  16.     procedure LMDTrackBar4Track(Sender: TObject; ScrollCode: TScrollCode;
  17.       var ScrollPos: Integer);
  18.     procedure FlatSpeedButton2Click(Sender: TObject);
  19.     procedure FlatSpeedButton3Click(Sender: TObject);
  20.   private
  21.     { Private declarations }
  22.   public
  23.     { Public declarations }
  24.   end;
  25. var
  26.   AuForm: TAuForm;
  27. implementation
  28. uses WHPlaySDK;
  29. {$R *.dfm}
  30. procedure TAuForm.FormShow(Sender: TObject);
  31. Var
  32.     Val1,Val2:LongInt;
  33. begin
  34.     dllConfig('GETAUDIOBALANCE',Val1,Val2);
  35.     LMDTrackBar4.Position:=Val1+10000;
  36. end;
  37. procedure TAuForm.LMDTrackBar4Track(Sender: TObject;
  38.   ScrollCode: TScrollCode; var ScrollPos: Integer);
  39. Var
  40.     Val1,Val2:LongInt;
  41. begin
  42.     Val1:=ScrollPos-10000;
  43.     dllConfig('SETAUDIOBALANCE',Val1,Val2);
  44. end;
  45. procedure TAuForm.FlatSpeedButton2Click(Sender: TObject);
  46. Var
  47.     Val1,Val2:Integer;
  48. begin
  49.     DllConfig('SHOWAUDIOPROPERTY',Val1,Val2);
  50. end;
  51. procedure TAuForm.FlatSpeedButton3Click(Sender: TObject);
  52. Var
  53.     Pos:Integer;
  54. begin
  55.     LMDTrackBar4.Position:=10000;
  56.     Pos:=LMDTrackBar4.Position;
  57.     LMDTrackBar4.OnTrack(LMDTrackBar4,TScrollCode(0),Pos);
  58. end;
  59. end.