在进行多媒体软件开发时,经常要调整各种设备的音量和设置静音,本人编写了一个单元,四个函数,分别用于获取音量(GetVolume(DN))、设置音量(SetVolume(DN,Value))、获取静音(GetVolumeM...
Procedure pcBeep(nFreq,nDura: Word); //pc喇叭发声 var VerInfo: TOSVersionInfo; nStart: DWord; begin VerInfo.dwOSVersionInfoSize := SizeOf(VerInfo); GetVersionEx(VerInfo); if VerInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then Windows.Beep...
合并两个 Wav 文件的函数 实例一 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender:...
unit Unit2; interface uses Windows, Messages, MMSystem, Classes, SysUtils, Math, Forms, Graphics, Controls; type TData8 = array[0..127] of byte; PData8 = ^TData8; TPointArr = array[0..127] of TPoint; PPointArr = ^TPointArr; TSoundCap = clas...
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, MMSystem; { 引用mmsystem单元} const FNumBuffers = 4; type TACMWAVEFORMAT = packed record case Integer of 0: (Format...
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ACMOut, ACMConvertor, ACMIn; type TForm1 = class(TForm) CheckBox1: TCheckBox; Button1: TButton; GroupBox1: TGroupBox; L...
和群里的大小牛们聊天时突发奇想,做了这个东西,通过麦克风发送命令控制电脑。程序没有什么深奥之处,调用了微软的SAPI实现语音识别,和文本语音,关于文本语音可参见我以前的...
代码文件: -------------------------------------------------------------------------------- unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, MPlayer; type TForm1 = c...
//播放前先要用 BASS_Init 函数进行播放设备初始化 function BASS_Init( device: Integer; {指定输出设备, 第一个是 1、第二个是 2; -1 表示使用当前设备} freq: DWORD; {采样率, 一般是 44100} flags: DWORD;...
//声明: sndPlaySound( lpszSoundName: PChar; {声音文件} uFlags: UINT{播放选项} ): BOOL; //uFlags 参数可选值: SND_SYNC = 0; {同步播放, 程序须等到播放完毕才向下执行} SND_ASYNC = 1; {异步播放, 在函数返回之...