⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u_vcsr_format.pas

📁 Voice Commnucation Components for Delphi
💻 PAS
字号:

(*
	----------------------------------------------
	  This source code cannot be used without
	  proper license granted to you as a private
	  person or an entity by the Lake of Soft, Ltd

	  Visit http://lakeofsoft.com/ for more information.

	  Copyright (c) 2001, 2007 Lake of Soft, Ltd
		     All rights reserved
	----------------------------------------------

	  created by:
		Lake, 04 Jul 2003

	  modified by:
		Lake, Jul 2003

	----------------------------------------------
*)

{$I unaDef.inc}

unit
  u_vcSR_format;

interface

uses
  Windows, unaTypes, Forms,
  StdCtrls, Controls, Classes;

type
  Tc_form_format = class(TForm)
    c_comboBox_sampling: TComboBox;
    Label1: TLabel;
    c_checkBox_16bits: TCheckBox;
    c_checkBox_stereo: TCheckBox;
    Button1: TButton;
    Button2: TButton;
    Label2: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
    function changeFormat(var sampling, bits, channels: int): bool;
  end;

var
  c_form_format: Tc_form_format;


implementation


{$R *.dfm}

uses
  unaUtils, Math;

{ Tc_form_format }

// --  --
function Tc_form_format.changeFormat(var sampling, bits, channels: int): bool;
begin
  c_comboBox_sampling.text := int2str(sampling);
  c_checkBox_16bits.checked := (16 = bits);
  c_checkBox_stereo.checked := (1 < channels);
  //
  if (mrOK = showModal()) then begin
    //
    sampling := max(1000, min(96000, str2intInt(c_comboBox_sampling.text, 8000)));
    bits := choice(c_checkBox_16bits.checked, 16, unsigned(8));
    channels := choice(c_checkBox_stereo.checked, 2, unsigned(1));
    //
    result := true;
  end
  else
    result := false;
end;


end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -