Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "windows.bi"
- #include "win\mmsystem.bi"
- #include "crt.bi"
- print "*** WaveIn Devices ***"
- Dim as uInteger devs = waveInGetNumDevs()
- print "waveIn devices: "; devs; chr(10,13)
- for dev as uInteger = 0 to devs-1
- Dim as WAVEINCAPS caps
- Dim as MMRESULT result = waveInGetDevCaps(dev, @caps, sizeof(caps))
- if (result <> MMSYSERR_NOERROR) then
- print "waveInGetDevCaps failed: returned 0x"+hex(result)
- sleep: system
- end if
- 'Print out device info
- print "-- waveIn device #";dev;" --"
- print "Manufacturer ID: "; caps.wMid
- print "Product ID: "; caps.wPid
- print "Version: "; caps.vDriverVersion \ 256;".";caps.vDriverVersion mod 256
- print "Product Name: "; caps.szPname
- print "Formats: 0x"; Hex(caps.dwFormats)
- print "Channels: "; caps.wChannels
- print "Reserved: "; caps.wReserved1; chr(10, 13)
- next dev
- print "*** WaveOut Devices ***"
- devs = waveOutGetNumDevs()
- print "waveOut devices: "; devs; chr(10,13)
- for dev as uInteger = 0 to devs-1
- Dim as WAVEOUTCAPS caps
- Dim as MMRESULT result = waveOutGetDevCaps(dev, @caps, sizeof(caps))
- if (result <> MMSYSERR_NOERROR) then
- print "waveOutGetDevCaps failed: returned 0x"+hex(result)
- sleep: system
- end if
- 'Print out device info
- print "-- waveOut device #";dev;" --"
- print "Manufacturer ID: "; caps.wMid
- print "Product ID: "; caps.wPid
- print "Version: "; caps.vDriverVersion \ 256;".";caps.vDriverVersion mod 256
- print "Product Name: "; caps.szPname
- print "Formats: 0x"; Hex(caps.dwFormats)
- print "Channels: "; caps.wChannels
- print "Reserved: "; caps.wReserved1
- print "Support: 0x"; caps.dwSupport
- 'Print list of supported device functions
- if (caps.dwSupport AND WAVECAPS_LRVOLUME) then print !"\tWAVECAPS_LRVOLUME"
- if (caps.dwSupport AND WAVECAPS_PITCH) then print !"\tWAVECAPS_PITCH"
- if (caps.dwSupport AND WAVECAPS_PLAYBACKRATE) then print !"\tWAVECAPS_PLAYBACKRATE"
- if (caps.dwSupport AND WAVECAPS_VOLUME) then print !"\tWAVECAPS_VOLUME"
- if (caps.dwSupport AND WAVECAPS_SAMPLEACCURATE) then print !"\tWAVECAPS_SAMPLEACCURATE"
- print !"\n";
- next dev
- sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement