Ham62

Untitled

Jul 17th, 2020
1,752
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
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×