How to detect if a computer has a sound card that plays Wave Audio.
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 'System & API - How to detect if a computer has a sound card that plays Wave Audio. #If Win32 Then Private Declare Function waveOutGetNumDevs Lib "winmm" () As Long #ElseIf Win16 Then Private Declare Function waveOutGetNumDevs Lib "mmsystem" () As Integer #End If Private Sub Form_Load() #If Win32 Then Dim i As Long #ElseIf Win16 Then Dim i As Integer #End If i = waveOutGetNumDevs() If i > 0 Then ' There is at least one device. MsgBox "You Can Play Wave Data" Else MsgBox "Cannot Play Wave Data" End If End End Sub |