Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "windows.bi"
- #include "win/mmsystem.bi"
- Dim as HMIXER hMixer
- Dim as MIXERCAPS mixerCaps
- Dim as MIXERLINE ml
- Dim as MIXERCONTROL volumeControl
- Dim as MIXERLINECONTROLS mixerLineControls
- Dim as MIXERCONTROLDETAILS_UNSIGNED value
- Dim as MIXERCONTROLDETAILS MixerControlDetails
- 'Open mixer
- if mixerOpen(@hMixer, MIXER_OBJECTF_MIXER, 0, 0, 0) then
- print "Error: couldn't open mixer..."
- mixerClose(hMixer)
- sleep: system
- end if
- 'Read device info
- if mixerGetDevCaps(cast(uinteger, hMixer), @mixerCaps, sizeof(MIXERCAPS)) then
- print "Error: could not read mixer info"
- mixerClose(hMixer)
- sleep: system
- end if
- print "Sound Card: "; mixerCaps.szPname
- print "There are " + str(mixercaps.cDestinations) + " supported destinations for this card"
- 'Get line info
- ml.cbStruct = sizeof(MIXERLINE)
- 'ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
- ml.dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY
- 'ml.dwDestination = 0'MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY
- if mixerGetLineInfo(cast(HMIXEROBJ, hMixer), @ml, MIXER_GETLINEINFOF_SOURCE) then
- print "Error getting speaker line info..."
- mixerClose(hMixer)
- sleep: system
- end if
- print "Name: " + ml.szShortName
- print "Description: " + ml.szName
- 'close mixer
- mixerClose(hMixer)
- sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement