It is currently April 26th, 2024, 5:40 pm

Adjust Mic Volume Level?

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

Hm.. Still occasionally get those "pipeline" errors, if I use the scroll wheel and change the values rapidly. I wonder if some "sleep" in the PS code might help somewhere, without making the skin all laggy to use.
User avatar
Yincognito
Rainmeter Sage
Posts: 7172
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Adjust Mic Volume Level?

Post by Yincognito »

One more screenshot and I'm up for a movie and a good night sleep, LOL:
PSFractional.jpg
I rest my case - it's either PS or the module. I have no freaking clue why this doesn't happen for you... :?
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Adjust Mic Volume Level?

Post by death.crafter »

Yincognito wrote: August 13th, 2021, 11:59 pm One more screenshot and I'm up for a movie and a good night sleep, LOL:
PSFractional.jpg
I rest my case - it's either PS or the module. I have no freaking clue why this doesn't happen for you... :?
Actually, AudioDeviceCmdlet can set fractional values.

It got to be something with PowershellRM's conversion to string and stuff, or Rainmeter maybe.
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Adjust Mic Volume Level?

Post by death.crafter »

Another implementation of the cmdlet.

Currently this can list all the output and input devices and let you select default device for each. But you can use it to make audio device selector for visualizers and stuff.
Screenshot 2021-08-14 090607.png
SystemAudio_v1.0.1.rmskin

Okay added the font file "Cascadia Mono" from Microsoft. I thought it came pre-installed, but it comes with Windows Terminal.
You do not have the required permissions to view the files attached to this post.
Last edited by death.crafter on August 14th, 2021, 7:19 pm, edited 2 times in total.
from the Realm of Death
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Adjust Mic Volume Level?

Post by sl23 »

:o The elves were busy last night :lol:
Thanks for the skin jsmorley, and thanks to death.crafter and Yincognito for the code and assistance :great:
- MuLab -
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

You know death.crafter, if you do talk to the author of PowershellRM, maybe he could set up an option on the plugin like LogErrors=0 (default 1) that would just supress those "pipeline" errors from being transmitted to the Rainmeter log. They are transient, non-fatal errors that basically means that some action was "skipped" since it was stepping on some other action. The plugin will recover and the action will presumably happen the next time it is called.

In effect it looks like the calls to the device volume stuff "locks" the device while being executed. With some very careful coding, it seems you can reduce them a lot with this AudioDeviceCmdlets.dll, but I can't seem to get rid of them entirely, and they just happen randomly from time to time. The trouble is that in order to "monitor" the current volume, you have to poke this thing once a second or so, and I suspect that is causing the conflicts when you actually change the value(s). Things are just running into each other.

This is the error I get:
System.Management.Automation.PSInvalidOperationException: The pipeline was not run because a pipeline is already running. Pipelines cannot be run concurrently.
at System.Management.Automation.Runspaces.PipelineBase.DoConcurrentCheck(Boolean syncCall, Object syncObject, Boolean isInLock)
at System.Management.Automation.Runspaces.RunspaceBase.DoConcurrentCheckAndAddToRunningPipelines(PipelineBase pipeline, Boolean syncCall)
at System.Management.Automation.Runspaces.PipelineBase.CoreInvoke(IEnumer (PSVolume\PSVolume.ini - [DeviceVolume])
Seems to me that the errors in the log might be valuable while "debugging" a skin you are writing, but then you might want to turn them off once you have it working as expected.

I do not like errors in the log. I do not like them, Sam-I-Am...
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Adjust Mic Volume Level?

Post by sl23 »

death.crafter wrote: August 14th, 2021, 3:38 am Another implementation of the cmdlet.

Currently this can list all the output and input devices and let you select default device for each. But you can use it to make audio device selector for visualizers and stuff.

Screenshot 2021-08-14 090607.png

SystemAudio_v1.0.0.rmskin
Doesn't seem to work for me. I've installed the 64bit plugin into Rainmeters Plugins folder and installed the @Resources folder into the Suites folder.
- MuLab -
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

sl23 wrote: August 14th, 2021, 1:04 pm Doesn't seem to work for me. I've installed the 64bit plugin into Rainmeters Plugins folder and installed the @Resources folder into the Suites folder.
Don't ever manually install plugin .dll files. I don't know what "Rainmeter Plugins folder" you are referring to, but in any case the .rmskin he provided will install the PowershellRM plugin as needed when you run it.

When a .rmskin includes a plugin, what it will do is put the correct 32bit/64bit version of the .dll in %APPDATA%\Rainmeter\Plugins if it is a new or newer version. It will also put both the 32bit and 64bit versions in the ..Skins\@Vault folder for safe-keeping and future use with your own .rmskins.

However, I must say that I get nothing much but a boatload of errors with that skin myself.


1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7172
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Adjust Mic Volume Level?

Post by Yincognito »

death.crafter wrote: August 14th, 2021, 12:54 amActually, AudioDeviceCmdlet can set fractional values.
It got to be something with PowershellRM's conversion to string and stuff
There you go. :thumbup: Now if this could be corrected, it would be even better (Rainmeter has no part in this, actually, since it happens even in bare PS when running those commands).
death.crafter wrote: August 14th, 2021, 3:38 am Another implementation of the cmdlet.

Currently this can list all the output and input devices and let you select default device for each. But you can use it to make audio device selector for visualizers and stuff.

Screenshot 2021-08-14 090607.png

SystemAudio_v1.0.0.rmskin
Now that's something I would like - something ... "universal": the equivalent of Win7Audio but for both input and output devices, providing values that I can use with other Rainmeter plugins. Unfortunately, this is what I get:
Nothing.jpg
I just installed it and loaded it. Do I have to set something else in order for it to work? All the measures are 0 and all variables nothing, if that matters.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Adjust Mic Volume Level?

Post by sl23 »

@jsmorley:
ok Thanks for the tip.

I use Rainmeter portable.

Damn. So is there a way to select Input device? I don't have Mic set as default unless it's required as I always get sound through it.

Ideally, I want a simple two button skin to select StereoMix or Mic as default input device.

Only error I get is: Script: File not valid (TEST-SUITE\SystemAudio\SystemAudio.ini - [CustomMenu])
- MuLab -