XmangiaX Posted October 31, 2006 Share Posted October 31, 2006 My co worker and I share speakers through our line in's. So if I want to listen to what hes playing I unmute my line-in. If I want to listen to my winamp I mute his line in. I was wondering if there is a way to toggle the little mute box with a handy little script. Any ideas? Thanks for any assistance given. Link to comment Share on other sites More sharing options...
Zedna Posted October 31, 2006 Share Posted October 31, 2006 I have this piece of code: ; Get Wav Sound Volume ; Author gafrost #include <GUIConstants.au3> MsgBox(0,"", _SoundGetWaveVolume()) Func _SoundGetWaveVolume() Local $WaveVol = -1, $p, $ret Const $MMSYSERR_NOERROR = 0 $p = DllStructCreate ("dword") If @error Then SetError(2) Return -2 EndIf $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr ($p)) If ($ret[0] == $MMSYSERR_NOERROR) Then $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData ($p, 1), 8), 4)) / 0xFFFF * 100) Else SetError(1) EndIf $Struct=0 Return $WaveVol EndFunc;==>_SoundGetWaveVolume It's for GET and not SET volume, so take it as way to go on... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
XmangiaX Posted November 1, 2006 Author Share Posted November 1, 2006 (edited) I will play with this code to see what I can come up with. Thanks, but Im looking for a toggle for mute on "LINE IN" and not a volume level number. We each have our own volume controls. Is it possible to do what I want? Edited November 1, 2006 by XmangiaX Link to comment Share on other sites More sharing options...
Zedna Posted November 1, 2006 Share Posted November 1, 2006 I will play with this code to see what I can come up with. Thanks, but Im looking for a toggle for mute on "LINE IN" and not a volume level number. We each have our own volume controls. Is it possible to do what I want? I know about LineIn WAV differrence. My example was for you as start for searching. WINMM.DLL has these functions: CloseDriver DefDriverProc DriverCallback DrvGetModuleHandle GetDriverModuleHandle MigrateAllDrivers MigrateSoundEvents NotifyCallbackData OpenDriver PlaySound PlaySoundA PlaySoundW SendDriverMessage WOW32 DriverCallback WOW32ResolveMultiMediaHandle WOWAppExit WinmmLogoff WinmmLogon _gfxLogoff@0 _gfxLogon@4 aux32Message auxGetDevCapsA auxGetDevCapsW auxGetNumDevs auxGetVolume auxOutMessage auxSetVolume gfxA ddGfx gfxBatchChange gfxCreateGfxFactoriesList gfxCreateZoneFactoriesList gfxDestroyDeviceInterfaceList gfxEnumerateGfxs gfxModifyGfx gfxOpenGfx gfxRemoveGfx joy32Message joyConfigChanged joyGetDevCapsA joyGetDevCapsW joyGetNumDevs joyGetPos joyGetPosEx joyGetThreshold joyReleaseCapture joySetCapture joySetThreshold mci32Message mciDriverNotify mciDriverYield mciExecute mciFreeCommandResource mciGetCreatorTask mciGetDeviceIDA mciGetDeviceIDFromElementIDA mciGetDeviceIDFromElementIDW mciGetDeviceIDW mciGetDriverData mciGetErrorStringA mciGetErrorStringW mciGetYieldProc mciLoadCommandResource mciSendCommandA mciSendCommandW mciSendStringA mciSendStringW mciSetDriverData mciSetYieldProc mid32Message midiConnect midiDisconnect midiInAddBuffer midiInClose midiInGetDevCapsA midiInGetDevCapsW midiInGetErrorTextA midiInGetErrorTextW midiInGetID midiInGetNumDevs midiInMessage midiInOpen midiInPrepareHeader midiInReset midiInStart midiInStop midiInUnprepareHeader midiOutCacheDrumPatches midiOutCachePatches midiOutClose midiOutGetDevCapsA midiOutGetDevCapsW midiOutGetErrorTextA midiOutGetErrorTextW midiOutGetID midiOutGetNumDevs midiOutGetVolume midiOutLongMsg midiOutMessage midiOutOpen midiOutPrepareHeader midiOutReset midiOutSetVolume midiOutShortMsg midiOutUnprepareHeader midiStreamClose midiStreamOpen midiStreamOut midiStreamPause midiStreamPosition midiStreamProperty midiStreamRestart midiStreamStop mixerClose mixerGetControlDetailsA mixerGetControlDetailsW mixerGetDevCapsA mixerGetDevCapsW mixerGetID mixerGetLineControlsA mixerGetLineControlsW mixerGetLineInfoA mixerGetLineInfoW mixerGetNumDevs mixerMessage mixerOpen mixerSetControlDetails mmDrvInstall mmGetCurrentTask mmTaskBlock mmTaskCreate mmTaskSignal mmTaskYield mmioAdvance mmioAscend mmioClose mmioCreateChunk mmioDescend mmioFlush mmioGetInfo mmioInstallIOProcA mmioInstallIOProcW mmioOpenA mmioOpenW mmioRead mmioRenameA mmioRenameW mmioSeek mmioSendMessage mmioSetBuffer mmioSetInfo mmioStringToFOURCCA mmioStringToFOURCCW mmioWrite mmsystemGetVersion mod32Message mxd32Message sndPlaySoundA sndPlaySoundW tid32Message timeBeginPeriod timeEndPeriod timeGet DevCaps timeGetSystemTime timeGetTime timeKillEvent timeSetEvent waveInAddBuffer waveInClose waveInGetDevCapsA waveInGetDevCapsW waveInGetErrorTextA waveInGetErrorTextW waveInGetID waveInGetNumDevs waveInGetPosition waveInMessage waveInOpen waveInPrepareHeader waveInReset waveInStart waveInStop waveInUnprepareHeader waveOutBreakLoop waveOutClose waveOutGetDevCapsA waveOutGetDevCapsW waveOutGetErrorTextA waveOutGetErrorTextW waveOutGetID waveOutGetNumDevs waveOutGetPitch waveOutGetPlaybackRate waveOutGetPosition waveOutGetVolume waveOutMessage waveOutOpen waveOutPause waveOutPrepareHeader waveOutReset waveOutRestart waveOutSetPitch waveOutSetPlaybackRate waveOutSetVolume waveOutUnprepareHeader waveOutWrite wid32Message winmmDbgOut winmmSetDebugLevel wod32Messageso you must start search MSDN and look for right one ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
XmangiaX Posted November 1, 2006 Author Share Posted November 1, 2006 oh ok... ive been toying with this bit of code, but to no avail! Ill keep digging for answers. If anyone has anymore insight I would greatly appreciate it. Thanks again! Link to comment Share on other sites More sharing options...
XmangiaX Posted November 3, 2006 Author Share Posted November 3, 2006 Im so stuck on this idea... Link to comment Share on other sites More sharing options...
Zedna Posted November 11, 2006 Share Posted November 11, 2006 I found some usefull links about mixer:http://www.autoitscript.com/forum/index.php?showtopic=21584http://www.borg.com/~jglatt/tech/mixer.htmhttp://msdn.microsoft.com/library/default....troldetails.asphttp://www.codeproject.com/audio/volctrl.a...2866#xx852866xxhttp://glorysoft.omsk.ru/vlt_download.htmlI think best one is commandline utility volumeline - from the above last link. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now