Advertisement
Ham62

Untitled

Nov 6th, 2017
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "windows.bi"
  2. #include "win/mmsystem.bi"
  3.  
  4. Dim as HMIXER hMixer
  5. Dim as MIXERCAPS mixerCaps
  6. Dim as MIXERLINE ml
  7. Dim as MIXERCONTROL volumeControl
  8. Dim as MIXERLINECONTROLS mixerLineControls
  9. Dim as MIXERCONTROLDETAILS_UNSIGNED value
  10. Dim as MIXERCONTROLDETAILS MixerControlDetails
  11.  
  12. 'Open mixer
  13. if mixerOpen(@hMixer, MIXER_OBJECTF_MIXER, 0, 0, 0) then
  14.     print "Error: couldn't open mixer..."
  15.     mixerClose(hMixer)
  16.     sleep: system
  17. end if
  18.  
  19. 'Read device info
  20. if mixerGetDevCaps(cast(uinteger, hMixer), @mixerCaps, sizeof(MIXERCAPS)) then
  21.     print "Error: could not read mixer info"
  22.     mixerClose(hMixer)
  23.     sleep: system
  24. end if
  25.  
  26. print "Sound Card: "; mixerCaps.szPname
  27. print "There are " + str(mixercaps.cDestinations) + " supported destinations for this card"
  28.  
  29. 'Get line info
  30. ml.cbStruct = sizeof(MIXERLINE)
  31. 'ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
  32. ml.dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY
  33. 'ml.dwDestination = 0'MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY
  34. if mixerGetLineInfo(cast(HMIXEROBJ, hMixer), @ml, MIXER_GETLINEINFOF_SOURCE) then
  35.     print "Error getting speaker line info..."
  36.     mixerClose(hMixer)
  37.     sleep: system
  38. end if
  39.  
  40. print "Name: " + ml.szShortName
  41. print "Description: " + ml.szName
  42.  
  43.  
  44. 'close mixer
  45. mixerClose(hMixer)
  46. sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement