MMDsWvIn.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:4k
- {========================================================================}
- {= (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.