��ο���ϵͳ�����������ܵ��ÿ�����壿

来源:互联网 发布:ubuntu 16.04 qq2017 编辑:程序博客网 时间:2024/04/25 00:35

���������ȱ�дһ�������������࣬Ȼ���ڴ�����Uses����࣬��������TrackBar���ֱ�Ϊ����������Min:=0;Max=255��������CheckBox�����������Ƿ��������������ͬ������Ȼ���д����Ϳ����ˡ�

// --[Yoyoworks]---------------------------------------------------------------- // �������ƣ�prjPowerFlashPlayer // ������ƣ�iPowerFlashPlayer // ��Ԫ���ߣ����ӽ� // ��ʼ���ڣ�2004��03��14�գ�14:31:16 // ��Ԫ���ܣ����������������ࡣ // -----------------------------------------------------------[SHANGHAi|CHiNA]-- Unit untTVolume; Interface Uses   MMSystemSysUtils; Type   TVolume Class(TObject)   Private     FVolumeLongInt//�洢������     FIsMuteBoolean//�洢����ֵ��     Procedure SetLeftVolume(VolumeInteger); //������������������     Function GetLeftVolumeInteger//�����������������     Procedure SetRightVolume(VolumeInteger); //������������������     Function GetRightVolumeInteger//�����������������     Procedure SetIsMute(IsMuteBoolean); //�����Ƿ����   Public     Constructor Create;     Destructor DestroyOverride;   Published     Property LeftVolumeInteger Read GetLeftVolume Write SetLeftVolume;     Property RightVolumeInteger Read GetRightVolume Write SetRightVolume;     Property MuteBoolean Read FIsMute Write SetIsMute;   End; Implementation // ----------------------------------------------------------------------------- // ��������   TVolume.Create // ������     �� // ����ֵ��   �� // ----------------------------------------------------------------------------- Constructor TVolume.Create; Begin   Inherited Create;   FVolume := 0;   FIsMute := False;   //��ʼ������   waveOutGetVolume(0@FVolume); //�õ��������� End; // ----------------------------------------------------------------------------- // ��������   TVolume.Destroy // ������     �� // ����ֵ��   �� // ----------------------------------------------------------------------------- Destructor TVolume.Destroy; Begin   Inherited Destroy; End; // ----------------------------------------------------------------------------- // ��������   TVolume.SetLeftVolume // ������     Volume: Integer // ����ֵ��   �� // ----------------------------------------------------------------------------- Procedure TVolume.SetLeftVolume(VolumeInteger); Begin   If (Volume 0Or (Volume 255Then     Raise Exception.Create('Range error of the left channel [0 to 255].');   //�����Volume����������0��255�ķ�Χ����׳��쳣��   If FIsMute False Then     Begin       waveOutGetVolume(0@FVolume);       //@ʾָ�����Volume��ָ�루32λ�������ô˺�����������ǵõ���������ֵ�������ڵ�����������ʱ�

原创粉丝点击