![]() I use IAudioVolumeLevel, which works for Line In, Microphone, etc.) (He is referring to the IAudioEndpointVolume interface, which is for master volume control. IAudioEndpointVolume value and SndVol not in Sync In Vista RTM, the SetMasterVolumeLevelScalar API runs the input volume (from 0.0 to 1.0) through a volume curve to produce a more linear volume experience - it's intended for use in application volume control sliders. To get to Speakers Properties, right-click the volume tray icon, click Playback Devices, and on the Playback tab, double-click Speakers. I guess it's because the Speakers Properties tab uses the same interface and algorithm as I do to convert decibels scalar values, whereas the Volume Mixer does not. Since I had tested it (on "Line Volume") and the results seemed accurate, your results surprise me.Īctually, testing it again, it does exactly what it is supposed to: VA_GetVolume("Speakers") matches up with the volume reported by Speakers Properties (Levels tab.) It is strange that Speakers in Speakers Properties and Speakers in the Volume Mixer differ like that. To use scalar values, I had to find an algorithm to calculate scalar from decibels, and vice versa. They only allow volume control using decibels (which is non-linear), whereas a more appropriate interface (for master volume only) allows decibels or scalar values (between 0 and 1.) The thing is VA_GETVOLUME() seems to retrieve the wrong volumes when compared to what is detailed by windows mixer,The APIs I used aren't really intended for simple master volume control. Sounds like a great app but i still cant get it to work correctly. I simply wrote the values derived from currentSound := VA_GetVolume() to a csv file as a test - what could have gone wrong? Any suggestions? The thing is VA_GETVOLUME() seems to retrieve the wrong volumes when compared to what is detailed by windows mixer, so i did a test: Mute subunits might not have unique names in those cases, use a numeric index instead of a name. Volume subunits often have the same names as shown on the Levels tab in the Properties of the sound device. Subunit/component names are defined by the audio drivers, so will vary from PC to PC. Äownload v2.3 for AutoHotkey 1.1 - v2.0 for AutoHotkey 1.0 ![]() Installation: Download and extract VA.ahk into a Lib folder. COM must be initialized prior to calling any VA functions: COM_Init().Requires Sean's Standard Library COM.ahk.Notes for v2.0 ( do not get this version if you have AutoHotkey v1.1): Scripts using it should NOT be run in XP compatibility mode or on any version of Windows older than Vista. Note: This library depends entirely upon APIs present only in Windows Vista and later. See the online documentation for a list of functions. VA provides alternatives to some SoundSet/SoundGet subcommands, as well as some additional features that SoundSet/SoundGet do not support. You don't need VA.ahk unless you want to use advanced functions not supported by SoundSet/SoundGet. Note: SoundSet and SoundGet on AutoHotkey v1.1.10 and later support Vista and later natively.
0 Comments
Leave a Reply. |