It is currently April 24th, 2024, 7:17 am

Audio Switcher Wrong Device

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Audio Switcher Wrong Device

Post by Mor3bane »

gran172 wrote: December 17th, 2019, 12:45 am Hey, thanks for the answer! I'd personally prefer having an image show up instead of text, thanks a lot for the help though, appreciate it mate! :)
Text can easily be replaced and located as per an image file of your choice - google the coolest image you can choose and it can be coded into the audio switcher per specification.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Audio Switcher Wrong Device

Post by Youkai1977 »

mak_kawa wrote: December 16th, 2019, 10:20 pm Hi Youkai1977

Thank you for clarification. It is "try and know" thing as I was fearing...:-)

Anyway I tried, and I know the index for my speaker is 3, headphone (non-USB) is 1. Both from on-board sound chip (Realtek?). Other devices can not be specified because of their unconnected state.
No problem, and always happy, as far as I understand Rainmeter myself * lol *

Yes, in my experience the index numbers for the audio devices are somehow strangely sorted and correspondingly (relatively) complicated to determine.
Of course, audio devices that are not connected cannot be selected. Sometimes yes, sometimes no. Is there another Windows thing * rofl *
Briefly about the headset for me (USB), the index number is probably not dependent on how an audio device is connected to the PC, i.e. whether USB or jack for example. It seems that coincidence plays a role. But I'm willing to learn, may someone explain to me who understands more about the matter.
gran172 wrote: December 17th, 2019, 12:44 am Hey unofortunately this doesn't seem to work, I replaced "Headset" and "Speakers" with the names shown in the Windows Mixer, is this what you meant?
No not quite, the names from the Windows Mixer are in...

Code: Select all

[DeviceName]
Meter=STRING
MeasureName=MeasureWin7Audio
FontSize=#FS1#
MeterStyle=Style
FontColor=#FontColor#
ClipString=1
X=3r
Y=1r
W=260
...automatically displayed. But you can rename the individual audio devices in the Windows Mixer under "Properties" according to your wishes. For example, from HDMI Out -> HDMI (TV) 42LM615S, the model name of my TV.
And so it will be shown to you as text in the meter "[DeviceName]"
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Audio Switcher Wrong Device

Post by Mor3bane »

I also chance to note that the Headset needs to be plugged in to register in the device list - sorry if that was painful to read but, just to be sure...

After messing around a lot with all of the code variations in this thread, i have found that Youkai's example is enough to have a tester of sorts that will allow you to see by scrolling the mouse which devices are on your device list.

In fact i have incorporated that feature into my desktop suite - that is why i noted the device needs to be plugged in - since my headset was not, I was like ,what!? then, "oh, ya"

EDIT: I have also noticed that if you make any changes in the audio device manager through windows, your skin will need to be immediately refreshed to realise the change - or your skin may not even work temporarily. :thumbup:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Audio Switcher Wrong Device

Post by Youkai1977 »

Mor3bane wrote: December 18th, 2019, 1:39 am EDIT: I have also noticed that if you make any changes in the audio device manager through windows, your skin will need to be immediately refreshed to realise the change - or your skin may not even work temporarily. :thumbup:
In order to avoid the temporary failure of the audio switch when you change the audio port outside (i.e. directly in / via Windows), you should install the following, which was also in my audio switcher:

Code: Select all

[MeasureAADD]
Measure=String
String=[MeasureWin7Audio]
OnChangeAction=[!Refresh]
DynamicVariables=1
The audio switcher updates itself automatically and then shows the selected audio device (depending on the set update rate in meters) immediately, and manual updating is no longer necessary.
This tip, however, did not grow on my crap, I found it here in the forum a few weeks ago, because I was looking for a solution for my visualizer, which was also affected when the audio port was changed, which you manually do Visualizer also had to update, otherwise it didn't show anything
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Audio Switcher Wrong Device

Post by Mor3bane »

Youkai1977 wrote: December 18th, 2019, 8:27 pm In order to avoid the temporary failure of the audio switch when you change the audio port outside (i.e. directly in / via Windows), you should install the following, which was also in my audio switcher:

Code: Select all

[MeasureAADD]
Measure=String
String=[MeasureWin7Audio]
OnChangeAction=[!Refresh]
DynamicVariables=1
The audio switcher updates itself automatically and then shows the selected audio device (depending on the set update rate in meters) immediately, and manual updating is no longer necessary.
This tip, however, did not grow on my crap, I found it here in the forum a few weeks ago, because I was looking for a solution for my visualizer, which was also affected when the audio port was changed, which you manually do Visualizer also had to update, otherwise it didn't show anything
OOOhh!
I saw that, and thought - what a great idea.
Then I didn't use it, haha.
Thanks for reminding me... and the OP...
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Audio Switcher Wrong Device

Post by Youkai1977 »

Mor3bane wrote: December 18th, 2019, 9:10 pm OOOhh!
I saw that, and thought - what a great idea.
Then I didn't use it, haha.
Thanks for reminding me... and the OP...
* lol *, I know that. Sometimes you can't see the forest for the trees. :???:
But well, now we should have solved the problem. In this sense, always happy :thumbup: :)
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl: