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

📄 mmdswvin.pas

📁 一套及时通讯的原码
💻 PAS
字号:
{========================================================================}
{=                (c) 1995-98 SwiftSoft Ronald Dittrich                 =}
{========================================================================}
{=                          All Rights Reserved                         =}
{========================================================================}
{=  D 01099 Dresden             = Fax.: +49 (0)351-8037944              =}
{=  Loewenstr.7a                = info@swiftsoft.de                     =}
{========================================================================}
{=  Actual versions on http://www.swiftsoft.de/mmtools.html             =}
{========================================================================}
{=  This code is for reference purposes only and may not be copied or   =}
{=  distributed in any format electronic or otherwise except one copy   =}
{=  for backup purposes.                                                =}
{=                                                                      =}
{=  No Delphi Component Kit or Component individually or in a collection=}
{=  subclassed or otherwise from the code in this unit, or associated   =}
{=  .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed     =}
{=  without express permission from SwiftSoft.                          =}
{=                                                                      =}
{=  For more licence informations please refer to the associated        =}
{=  HelpFile.                                                           =}
{========================================================================}
{=  $Date: 02.08.98 - 18:07:36 $                                        =}
{========================================================================}
unit MMDsWvIn;

{$I COMPILER.INC}

interface

uses
  Windows,
  SysUtils,
  Messages,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs,
  MMSystem,
  MMUtils,
  MMObj,
  MMString,
  MMDSPObj,
  MMDSPMtr,
  MMRegs,
  MMPCMSup,
  MMWaveIO,
  MMDSound,
  MMDsCapt,
  MMWavIn;

type
   {---------------------------------------------------------------------------}
   TMMDSWaveIn = class(TMMCustomWaveIn)
   protected
    procedure SetupWaveEngine; override;
   end;

function DSWaveInGetDeviceName(DeviceID: TMMDeviceID): String;

implementation

uses MMDSystm;

{------------------------------------------------------------------------------}
function DSWaveInGetDeviceName(DeviceID: TMMDeviceID): String;
var
  Caps: TWaveInCaps;
begin
  Result := '';
  if (DeviceID < DSWaveInGetNumDevs) and (DeviceID >= integer(WAVE_MAPPER)) then
  begin
     { Set the name and other WAVEINCAPS properties to match the ID }
    if DSWaveInGetDevCaps(DeviceID, @Caps, sizeof(TWaveInCaps)) = 0 then
      Result := StrPas(Caps.szPname);
  end;
end;

{== TMMDSWaveIn ===============================================================}
procedure TMMDSWaveIn.SetupWaveEngine;
begin
  @waveInGetNumDevs       := @DSWaveInGetNumDevs;
  @waveInGetDevCaps       := @DSWaveInGetDevCaps;
  @waveInGetErrorText     := @DSWaveInGetErrorText;
  @waveInOpen             := @DSWaveInOpen;
  @waveInClose            := @DSWaveInClose;
  @waveInPrepareHeader    := @DSWaveInPrepareHeader;
  @waveInUnprepareHeader  := @DSWaveInUnprepareHeader;
  @waveInAddBuffer        := @DSWaveInAddBuffer;
  @waveInStart            := @DSWaveInStart;
  @waveInStop             := @DSWaveInStop;
  @waveInReset            := @DSWaveInReset;
  @waveInGetPosition      := @DSWaveInGetPosition;
  @waveInGetID            := @DSWaveInGetID;
end;

end.

⌨️ 快捷键说明

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