HOME | DD

Published: 2010-06-03 17:26:28 +0000 UTC; Views: 24151; Favourites: 32; Downloads: 2938
Redirect to original
Description
I am using Windows 7 with multiple audio output devices (PC Speakers and a TV over HDMI). I found it annoying always having to switch between them through the Sound Settings dialog. With the plugin you can toggle between the devices or set a specific device as the default output device.v1.2
I've removed the output device index as standard measure output and replaced it with the current volume. I also added a few bangs to change the volume.
v1.4
Stability and debug output. (Fixed a COM init issue).
Thanks to ~White-Baron for feedback on this.
v1.5
Fixed volume being 1% off sometimes.
v1.6
Added Mute/Unmute bangs, Meter shows volume -1 when muted.
Technical stuff:
This plugin uses Windows Mmdeviceapi and an undocumented API call to set the default audio device in Microsoft Windows 7. It also works in Windows Vista but will not work in Windows XP.
Install:
Depending on which version of Rainmeter you are running you have to pick the x32 or the x64 folder. Copy the dll to the Plugin directory (..rainmeter-install-path\Plugins). There is also an example config.
Credits:
-undocumented API header-
[link] by EreTIk
see: [link]
-button-
music-2.png from [link] by omercetin
07.06.2010 x32 crash? fixed
08.06.2010 x64 dll fixed (sorry
20.06.2010 Stability
20.06.2010 Fixed volume 1% off
22.08.2010 see v1.6
Related content
Comments: 52
Reiswaffel In reply to ??? [2014-12-17 11:47:30 +0000 UTC]
I don't have win8 so I couldn't tell you. Have you tried it? Rainmeter seems to work with win8. Maybe the plugin will too.
π: 0 β©: 0
JanPT [2014-04-20 22:26:02 +0000 UTC]
Hi,
I was wondering is there an option to read the currentΒ OutputIndex ?
π: 0 β©: 1
Reiswaffel In reply to JanPT [2014-04-29 13:23:10 +0000 UTC]
Hi,
sorry for the late reply. I just moved house and was offline for a while. Unfortunately there is no index output, just the name of the current device. If I remember correctly I only had two output methods available: A string and a number. I chose the name and the volume.
If your setup doesn't change (always the same devices) you could try matching their names and transforming that into an index. I think there are some string operators you can work with. Just look it up in the help or the forums.
Kind regards,
Stefan
π: 0 β©: 0
arbartenn [2013-03-07 17:06:35 +0000 UTC]
Im trying to make multiple buttons to easily switch the output instead of toggling through the different output options. In the script the button command says "measurewin7audio togglenext" what command would i use in place of "togglenext" to select a specific output for the button?
π: 0 β©: 1
Reiswaffel In reply to arbartenn [2013-03-07 20:19:47 +0000 UTC]
From the SoundExample.ini file that comes with the plug-in:
; Use:
: !RainmeterPluginBang "MeasureWin7Audio ToggleNext"
; - if the last device is active it will jump to the first
; !RainmeterPluginBang "MeasureWin7Audio TogglePrevious"
; - if the first device is active it will jump to the last
; !RainmeterPluginBang "MeasureWin7Audio SetOutputIndex i"
; - set a specific device with index i
; [this depends on your system setup and number of output devices]
; !RainmeterPluginBang "MeasureWin7Audio ToggleMute"
; - toggle mute state
; !RainmeterPluginBang "MeasureWin7Audio SetVolume x"
; - set a specific volume x (between 0 and 100), this disables mute
; !RainmeterPluginBang "MeasureWin7Audio ChangeVolume x"
; - change the volume by x, this disables mute
So you're looking for SetOutputIndex i with i being the device index of your choice
Hope I was able to help..
π: 0 β©: 1
Bloody-Ares In reply to Reiswaffel [2013-10-15 14:53:22 +0000 UTC]
This is potentially a very basic question, but here we go. What is the device index and how does one find it?
I have three devices and would like to set a button for each that would set it as the default sound device.
Any help would be very much appreciated.
π: 0 β©: 1
Reiswaffel In reply to Bloody-Ares [2013-10-16 06:33:10 +0000 UTC]
The device index is just the entry number of a device in the list of playback devices.
I don't quite remember if it was 0-based or 1-based but you can find the device list if you right click the speaker icon in the system bar (next to the clock). From the context menu select "Playback Devices". The list is on the first tab "Playback". So the command for the first device would be !RainmeterPluginBang "MeasureWin7Audio SetOutputIndex 0" or !RainmeterPluginBang "MeasureWin7Audio SetOutputIndex 1" and so on. I hope that helps.. just play around with that and you should get what you're looking for.
π: 0 β©: 0
yuushaART [2012-03-06 02:38:03 +0000 UTC]
Hey, I was wondering if I could use this as a base for an audio output toggle/mute widget, would that be cool?
π: 0 β©: 1
Reiswaffel In reply to yuushaART [2012-03-06 19:43:37 +0000 UTC]
Of course, that's what it's for
π: 0 β©: 1
yuushaART In reply to Reiswaffel [2012-03-07 04:31:12 +0000 UTC]
Thanks, and I really mean it -- the widget alone meant going from five clicks to one when switching between devices
π: 0 β©: 1
Reiswaffel In reply to yuushaART [2012-03-07 07:33:55 +0000 UTC]
I know, that annoyed me too. That's why I made it.
π: 0 β©: 0
Reiswaffel In reply to kumarjit123 [2011-10-19 17:13:54 +0000 UTC]
No, XP doesn't support this. Sorry.
π: 0 β©: 1
kumarjit123 In reply to Reiswaffel [2011-10-20 10:38:51 +0000 UTC]
THANKS FOR THE HELP...CAN I REQUEST FOR A XP VERSION PLEASE....
π: 0 β©: 1
Reiswaffel In reply to kumarjit123 [2011-10-20 16:07:44 +0000 UTC]
I had a look into it when I did this for Vista and 7 but XP just doesn't have the support for this kind of thing, i.e. it's not possible.
π: 0 β©: 1
kumarjit123 In reply to Reiswaffel [2011-10-20 16:36:56 +0000 UTC]
its ok thanks again for ur help...i really like your work
π: 0 β©: 1
kumarjit123 In reply to Reiswaffel [2011-10-24 08:43:04 +0000 UTC]
there is many skins that can measure wifi signal strength with wifistatus.dll plugin file...is there ne plugin that can measure broadband 3g and 2g signal strength???please help...
π: 0 β©: 1
Reiswaffel In reply to kumarjit123 [2011-10-24 17:58:30 +0000 UTC]
Probably, try asking that question in the rainmeter forum. They'll know
π: 0 β©: 0
Asasenkou [2011-09-07 23:35:15 +0000 UTC]
I do have multiple outputs, I have my USB headset and my actual speakers, and I am also running Windows 7 64 bit, and I used the right dll. Last night when I posted, I wasn't thinking clearly and I am actually using someone else's skin, and it seems their scripting wasn't 100% correct, I compared it to the config file for yours, and figured out the issue and corrected it. Thanks for answering me though lol
π: 0 β©: 1
Asasenkou [2011-09-07 07:05:33 +0000 UTC]
Hi I just downloaded this as I also am too lazy to go through windows sound settings to change audio output xD However the volume buttons work, but the ability to change outputs doesn't, and I am using the correct dll, can you help me?
π: 0 β©: 1
Reiswaffel In reply to Asasenkou [2011-09-07 20:10:37 +0000 UTC]
Mhh difficult to say... make sure you have different output devices to set. As you're using the plugin to do just that I assume you have them
Make sure you're using Windows 7 or Vista. XP is not supported.
Have a look in the help file on how to enable logging and see if that shows an error somewhere in the log file.
Regards
π: 0 β©: 0
balazslaci [2011-02-12 18:24:19 +0000 UTC]
Hello,
Don't you have something similar for WinXP? I1m still using this and don't plane to change but this plugin would be very useful.
Thank you
π: 0 β©: 1
Reiswaffel In reply to balazslaci [2011-02-12 19:32:02 +0000 UTC]
I'm sorry but Windows XP doesn't have the API that is used to do this. It's just too old
π: 0 β©: 0
Imurai [2010-11-05 23:59:47 +0000 UTC]
Man! I was unknowingly searching for this ever since i use w7! Thanks so much!
π: 0 β©: 1
Reiswaffel In reply to Imurai [2010-11-06 14:01:25 +0000 UTC]
You're welcome. I only made it because I needed it too.
π: 0 β©: 1
Imurai In reply to Reiswaffel [2011-05-17 18:16:46 +0000 UTC]
Hey, um, just wondering, is there a way to disable a certain device in this skin (or in W7 overall) cause there's a digital output on my sound card that i don't use and it's a bit annoying to click through that all the time (well, laziness bore this very plug-in after all, didn't it?)
π: 0 β©: 1
Reiswaffel In reply to Imurai [2011-05-18 16:52:41 +0000 UTC]
Sure there is. Right click the speaker symbol in the Win7 system bar and choose Playback devices. Then right click on any device and click Disable. The plug-in only goes through the enabled ones.
You could also create your own Config and use !RainmeterPluginBang "MeasureWin7Audio SetOutputIndex i" to set a specific device as active. 'i' is the index of your device in the list of Playback devices.
Have fun
π: 0 β©: 0
DizzyDaft [2010-06-22 14:56:26 +0000 UTC]
thanx for the l8test updates, on the previous x64 i used to get the *ERROR* on the satus but since the latest relise i've not had it yet
I was wundering if there will be a command for to show 0-100% next to the bar for this little beuty
becouse it will look really cool in the center of the progress bar
π: 0 β©: 1
Reiswaffel In reply to DizzyDaft [2010-06-22 17:16:09 +0000 UTC]
Sure that's easy.
~Wasky1 mentioned this in the rainmeter forum. Just add the following to the ini file and it will convert the numerical output to a string.
-------------------------
[CalcMeasureWin7Audio]
Measure=Calc
Formula=MeasureWin7Audio
[VolText]
Meter=String
MeasureName=CalcMeasureWin7Audio
X=140
Y=50
MeterStyle=FontStyle
StringAlign=CENTER
StringEffect=BORDER
Text="%1%"
DynamicVariables=1
------------------------
You might have to adjust it for your own config. See the rainmeter help for hints.
π: 0 β©: 1
DizzyDaft In reply to Reiswaffel [2010-06-23 16:04:11 +0000 UTC]
i Should of Known that lmbo
Thanx this is amazing keep it up
π: 0 β©: 0
White-Baron [2010-06-17 17:32:24 +0000 UTC]
I can't seem to get this to work for me, the output says error and clicking the buttons doesn't change the volume. Any ideas on what is happening? I'd love to use this for my new skin.
π: 0 β©: 2
Reiswaffel In reply to White-Baron [2010-06-17 21:22:07 +0000 UTC]
Oh and you're using the correct dll?
π: 0 β©: 0
Reiswaffel In reply to White-Baron [2010-06-17 20:56:47 +0000 UTC]
You're using Windows Vista or 7?
You have an active default output device?
If yes.. PM me your email and I'll send you an updated version with a more detailed error description.
π: 0 β©: 0
poiru [2010-06-08 18:48:45 +0000 UTC]
Works on Win7 x64 now, thanks
You could also change "It is not tested in Windows Vista" to "Confirmed working on Vista" or something like that..
π: 0 β©: 0
Wasky1 [2010-06-08 16:56:41 +0000 UTC]
64bit version says dll not found is it something to do with ACPIv2 or something i have no option in setup to enable this, im on shop installed x64 home prem, and self installed x86 ult,
π: 0 β©: 1
CryptoWorm [2010-06-08 16:21:49 +0000 UTC]
I think you may have an issue with your x64 version, Rainmeter will not recognise it correctly for me.
Looks good from what i can see at the moment though
π: 0 β©: 1
Reiswaffel In reply to CryptoWorm [2010-06-08 18:34:57 +0000 UTC]
fixed the x64 version, sorry
π: 0 β©: 1
poiru [2010-06-08 16:20:36 +0000 UTC]
Great job mate! Tested on Vista x32 and 7 x64 and worked perfectly.
π: 0 β©: 1
Reiswaffel In reply to poiru [2010-06-08 18:37:02 +0000 UTC]
Thanks, I'm glad you all like it
π: 0 β©: 0
DizzyDaft [2010-06-06 20:46:20 +0000 UTC]
lmbo i just downloade the version from befor and i was just wundering humm darn no 64
but to my suprise 2 sec's l8r bam you updated gr8t stuff
π: 0 β©: 1
jsmorley [2010-06-03 19:03:00 +0000 UTC]
If you would like to contact me via a PM on our forums ([link] ) I would be glad to do a 64bit build and get it back to you so you can include both.
Just PM "jsmorley"
- Rainmeter Developer
π: 0 β©: 1
| Next =>