📄 soundcard.frm
字号:
VERSION 5.00
Begin VB.Form frmSoundCard
BackColor = &H00FF8080&
Caption = "蓝霞软件技术"
ClientHeight = 4755
ClientLeft = 60
ClientTop = 345
ClientWidth = 2910
Icon = "SoundCard.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4755
ScaleWidth = 2910
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H00FF8080&
ForeColor = &H00000000&
Height = 4455
Left = 0
ScaleHeight = 4395
ScaleWidth = 2835
TabIndex = 0
Top = 120
Width = 2895
End
End
Attribute VB_Name = "frmSoundCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function TestCard() As Boolean
Dim Y As Long
Dim Find As String
Find = "Find Sound Blaster Card"
Y = waveOutGetNumDevs()
If Y > 0 Then
TestCard = True
'MsgBox "Test OK!,I can found Sound Blaster Card!", Mb_OK, Find
Else
TestCard = False
MsgBox "No found device", Mb_OK, Find
End If
End Function
Public Function Listwaveformat(Aboutwave As Long) As String
Dim Waveformat As String
Select Case Aboutwave
Case Wave_Format_1m08
Waveformat = "11.025Khz,Mono,8bit,11Kb/Ps"
Case Wave_Format_1m16
Waveformat = "11.025Khz,Mono,16bit,22Kb/Ps"
Case Wave_Format_1s08
Waveformat = "11.025Khz,Stereo,8bit,22Kb/Ps"
Case Wave_Format_1s16
Waveformat = "11.025Khz,Stereo,16bit,43Kb/Ps"
Case Wave_Format_2m08
Waveformat = "22.05Khz,Mono,8bit,22Kb/Ps"
Case Wave_Format_2m16
Waveformat = "22.05Khz,Mono,16bit,43Kb/Ps"
Case Wave_Format_2s08
Waveformat = "22.05Khz,Stereo,8bit,43Kb/Ps"
Case Wave_Format_2s16
Waveformat = "22.05Khz,Stereo,16bit,86Kb/Ps"
Case Wave_Format_4m08
Waveformat = "44.1Khz,Mono,8bit,43Kb/Ps"
Case Wave_Format_4m16
Waveformat = "44.1Khz,Mono,16bit,86Kb/Ps"
Case Wave_Format_4s08
Waveformat = "44.1Khz,Stereo,8bit,86Kb/Ps"
Case Wave_Format_4s16
Waveformat = "44.1Khz,Stereo,16bit,172Kb/Ps"
End Select
Listwaveformat = Waveformat
End Function
Public Function Listwavesupport(Aboutwave As Long) As String
Dim Wavefun As String
Select Case Aboutwave
Case Wavecaps_Pitch
Wavefun = "Support Pitch"
Case Wavecaps_Playbackrate
Wavefun = "Support Playback"
Case Wavecaps_Volume
Wavefun = "Support Volume Control"
Case Wavecaps_Lrvolume
Wavefun = "Support Left-Right Channals"
Case Wavecaps_Sync
Wavefun = "Support Synchronization"
End Select
Listwavesupport = Wavefun
End Function
Private Sub CmdTest1()
Dim Existent As Boolean
Dim Consequencd As Long
Dim Returncaps As Waveoutcaps
Dim Mainver As Long
Dim Lesserver As Long
Dim Pname As String * 32
Dim Aboutwave As Long
Dim Channel As String * 2
Dim i As Integer
Picture1.Cls
Existent = TestCard
If Existent Then
Consequence = waveOutGetDevCaps(0, Returncaps, Len(Returncaps))
If Consequencd = 0 Then
Mainver = Returncaps.vDriverVersion \ 256
Lesserver = Returncaps.vDriverVersion Mod 256
Pname = Left$(Returncaps.szPname, InStr(Returncaps.szPname, Chr$(0)) - 1)
Channel = Str$(Returncaps.Wchannels)
Picture1.Print ""
Picture1.Print " 蓝霞声卡测试报告"
Picture1.Print ""
Picture1.Print "声卡测试结果如下:"
Picture1.Print ""
Picture1.Print "产品名称:"; Pname
Picture1.Print "产品 Id:"; Returncaps.wPid
Picture1.Print "驱动程序 Id:"; Returncaps.wMid
Picture1.Print "驱动程序版本:"; Mainver; "."; Lesserver
Picture1.Print "输出声道:"; Channel
Picture1.Print "支持格式列表:"
For i = 0 To 11
If Returncaps.Dwformats And (2 ^ i) Then
Picture1.Print Listwaveformat(2 ^ i)
End If
Next i
Picture1.Print "扩展输出功能列表:"
For i = 0 To 4
If Returncaps.Dwsupport And (2 ^ i) Then
Picture1.Print Listwavesupport(2 ^ i)
End If
Next i
End If
Else
End
End If
End Sub
Private Sub Form_Load()
Picture1.Cls
CmdTest1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -