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

📄 urecordcenter.pas

📁 自己写的用delphi封装东劲板卡api.
💻 PAS
字号:
unit uRecordcenter;

interface

uses DjBase,SysUtils;

type
  TRecordCenter = class
  private

    CountNum:array[0..MaxChannel-1] of integer;
  protected
  public
    RecordPath:string;
    constructor Create;
    destructor Destroy;override;
    function GetRecordFileName(ChnlID:integer):string;
  end;

var
  RecordCenter:TRecordCenter ;

implementation


{ TRecordCenter }

constructor TRecordCenter.Create;
var
  i:integer;
begin
  for i := low(CountNum) to high(CountNum) do
    CountNum[i] := 0;
end;

destructor TRecordCenter.Destroy;
begin

  inherited;
end;

function TRecordCenter.GetRecordFileName(ChnlID: integer): string;
var
  FilePath:string;
  FileName:string;
begin
  Result := '';
  FilePath := RecordPath + IntToStr(ChnlID);
  if not DirectoryExists(FilePath) then
    CreateDir(FilePath);
  FilePath := FilePath + '\' + FormatDateTime('YYYY',now) ;
  if not DirectoryExists(FilePath) then
    CreateDir(FilePath) ;
  FilePath := FilePath + '\' + FormatDateTime('MM',now) ;
  if not DirectoryExists(FilePath) then
    CreateDir(FilePath) ;
  inc(CountNum[ChnlID]);
  FileName := FormatDateTime('YYMMDDHHNNSS',now)+'_'+IntToStr(ChnlID) +'_'+ IntToStr(CountNum[ChnlID])+'.pcm';
  Result := FilePath + '\' + FileName ;
end;

end.

⌨️ 快捷键说明

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