It is currently April 24th, 2024, 7:20 pm
Adjust Mic Volume Level?
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Adjust Mic Volume Level?
Hm.. death.crafter, while I like your idea, as it is simpler and more clean, it does't get rid of those "pipeline" errors in the log. Those are super annoying...
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Adjust Mic Volume Level?
If you haven't noticed I use floor on $MouseX:%$. So there is no way you could pass a fractional value, unless Rainmeter got something fishy going onYincognito wrote: ↑August 13th, 2021, 11:01 pm Of course, it's more obvious in death.crafter's version, as it's based on click and doesn't "refine" the return value through something like [*MeasureInputPercent:%,0*]
from the Realm of Death
-
- Rainmeter Sage
- Posts: 7157
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Adjust Mic Volume Level?
Don't know if it will work for you, but for me it does:death.crafter wrote: ↑August 13th, 2021, 11:11 pmSame here. I use floor(), so even if you could, you can't possibly set a double value in the first place. I wonder why they end up getting fractional values.
- set the volume to 1% (you can do that from Windows settings as well)
- temporarily set return $((Get-AudioDevice -RecordingVolume) -replace '%', '') | Out-File -FilePath .\Volume.txt in your scripts, to create a Volume.txt file in the current folder with the output; the above addition might be incorrect, so I would quickly unload the skin afterwards, as I didn't bother with those details
This is how Volume.txt looks for me:
Code: Select all
0,9999989
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Adjust Mic Volume Level?
I know right. I don't have a single idea why they show up at all. I get them at random and they get fixed automatically. Well they did in my other skin's settings menu.
Maybe I will do some trial and error when I have time tomorrow.
I was not saying you are lying or anyone is. I am just saying that I took measures to prevent that. It's probably some error with the cmdlet.Yincognito wrote: ↑August 13th, 2021, 11:21 pm P.S. And please, try to listen instead of saying things are not possible or that is no way stuff can happen. I'm not lying, you know...
from the Realm of Death
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Adjust Mic Volume Level?
Got it... It was the overkill and redunant $RmAPI.Bang('[!CommandMeasure InputVolume Update][!UpdateMeter *][!Redraw]') calls in the Powershell script. This was causing a recursive re-entry into the plugin. Errors gone...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Adjust Mic Volume Level?
As to the fractional numbers, I just don't get that. The only thing I use to set the volume is something like [MeasureOutputPercent:%,0] which I don't at all see how it can be a fractional value.
-
- Rainmeter Sage
- Posts: 7157
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Adjust Mic Volume Level?
Yep, that definitely comes from PS. Rainmeter has no fault in that indeed (I also tried Floor, Round, Trunc, passing the value to a measure instead, before I realized PS sent it that way - and as my screenshot prove, so does in jsmrley's skin, the only reason why it's not seen is because he rounds the value before showing it).death.crafter wrote: ↑August 13th, 2021, 11:25 pmI was not saying you are lying or anyone is. I am just saying that I took measures to prevent that. It's probably some error with the cmdlet.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Adjust Mic Volume Level?
Updated the .rmskin in https://forum.rainmeter.net/viewtopic.php?f=5&t=38135&start=30#p195744
Edit: Updated it again due to a small "oops".
Edit: Updated it again due to a small "oops".
-
- Rainmeter Sage
- Posts: 7157
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Adjust Mic Volume Level?
That's true, like I mentioned in the reply to death.crafter as well. The problem is in PS (or in the AudioDeviceCmdlets module?). Your "input" measure is getting the fractional value for me, if I set my mic to 1%, irrespective if I do it from Windows or otherwise: I'm only saying this to help. If other folks use your skin, they might not realize they have to round the measure's value like you did, e.g. [MeasureOutputPercent:%,0] and look to use it directly. The same for death.crafter's implementation.
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on August 13th, 2021, 11:43 pm, edited 1 time in total.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Adjust Mic Volume Level?
Ok. I just have yet to ever see a fractional value returned.Yincognito wrote: ↑August 13th, 2021, 11:40 pm That's true, like I mentioned in the reply to death.crafter as well. The problem is in PS. Your "input" measure is getting the fractional value for me, if I set my mic to 1%, irrespective if I do it from Windows or otherwise:
Fractional.jpg
I'm only saying this to help. If other folks use your skin, they might not realize they have to round the measure's value like you did, e.g. [MeasureOutputPercent:%,0] and look to use it directly. The same for death.crafter's implementation.
You do not have the required permissions to view the files attached to this post.