Advertisement
Ham62

Untitled

Jul 17th, 2020
2,118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function GetLineState(device as DeviceControl, dwControlID as DWORD) as DWORD
  2.     with device
  3.         Dim as MIXERCONTROLDETAILS mxcd
  4.         mxcd.dwControlID = dwControlID ' control ID
  5.         mxcd.cChannels = 1             ' Apply volume uniformly to all channels
  6.         mxcd.cMultipleItems = 0        ' Only setting one value
  7.            
  8.         ' Control status returned in this struct
  9.         Dim as MIXERCONTROLDETAILS_UNSIGNED details
  10.    
  11.         mxcd.paDetails = @details
  12.         mxcd.cbDetails = sizeof(details)
  13.         mxcd.cbStruct  = sizeof(MIXERCONTROLDETAILS)
  14.        
  15.         '|| Crash      ||    
  16.         'vv       Here vv
  17.         var result = mixerGetControlDetails(cast(HMIXEROBJ, .hMixer), @mxcd, MIXER_SETCONTROLDETAILSF_VALUE)
  18.         if (result <> MMSYSERR_NOERROR) then
  19.             print "Error #"; result; " getting line info for "; .szName
  20.         end if
  21.        
  22.         return details.dwValue ' Return line control value
  23.     end with
  24. end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement