System sound volume plugin supporting Vista
Posted: October 26th, 2007, 10:58 pm
Since erlis's System Sound Volume Plugin does not work under Vista, I had to write a new volume plugin for my HTPC box. Get it from the attached archive.
Function 1 gives the volume percentage with a "%" sign at the end, or "mute" if the audio is muted. Function 2 returns 1 if the audio is muted, 0 otherwise. Functions 3 and 4 return the percentage as a number. Function 5 returns 1 if there has been a change in the volume, 0 otherwise. Function 6 returns the name of the audio device. All functions ignore their parameters.
I'm also attaching the source and project file. To compile it, you will need the Windows Vista SDK plus VC++ and/or the platform SDK.
Function 1 gives the volume percentage with a "%" sign at the end, or "mute" if the audio is muted. Function 2 returns 1 if the audio is muted, 0 otherwise. Functions 3 and 4 return the percentage as a number. Function 5 returns 1 if there has been a change in the volume, 0 otherwise. Function 6 returns the name of the audio device. All functions ignore their parameters.
I'm also attaching the source and project file. To compile it, you will need the Windows Vista SDK plus VC++ and/or the platform SDK.