DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: button for toggling stereo <-> mono  (Read 16,406 times)

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
IDEA: button for toggling stereo <-> mono
« on: July 24, 2022, 12:26 AM »
Create a button that reads the registry key " AccessibilityMonoMixState" present in HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Audio and shows accordingly
STEREO / push to set mono or
MONO / push to set stereo
and executes 'powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/s,/c,REG ADD "HKCU\Software\Microsoft\Multimedia\Audio" /V AccessibilityMonoMixState /T REG_DWORD /D 1 /F & net stop "Audiosrv" & net start "Audiosrv"' -Verb runAs"' or
'powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/s,/c,REG ADD "HKCU\Software\Microsoft\Multimedia\Audio" /V AccessibilityMonoMixState /T REG_DWORD /D 0 /F & net stop "Audiosrv" & net start "Audiosrv"' -Verb runAs"'

so it's possible to know the stereo/mono state and change it (if needed) pushing the button
THANKS!

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #1 on: July 29, 2022, 11:17 PM »
Hi! I'm coding it! :Thmbsup:

Should be ready in just a couple days.

Cheers!
« Last Edit: August 15, 2022, 03:01 PM by publicdomain »

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #2 on: July 30, 2022, 03:52 PM »
Hi! I'm coding it! :Thmbsup:

Should be ready in just a couple days.

Cheers!
Great!

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #3 on: August 01, 2022, 02:45 AM »
Great!

Glad to help!  :) It's been a hectic Sunday yet "Mono Toggler" is soon to be released @ GitHub.

Repo: https://github.com/publicdomain/mono-toggler

:up:

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #4 on: August 05, 2022, 07:37 AM »


Glad to help!  :) It's been a hectic Sunday yet "Mono Toggler" is soon to be released @ GitHub.


Having problems?  :-[

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #5 on: August 05, 2022, 07:37 PM »
Having problems?

All good code-wise! Currently adding the RegistryEvent "wrapper" for status detection to be real time :up:

MonoToggler_ALPHA-2022-08-5.png

(Just had quite a time @ work, but release IS coming! :))

Cheers!  :Thmbsup:

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #6 on: August 05, 2022, 10:15 PM »

Looks nice!

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #7 on: August 05, 2022, 11:23 PM »
Looks nice!

I take it you want status change to be detected in real time, correct? :)

(If it's manual refresh, then the app is pretty much done)

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #8 on: August 06, 2022, 06:03 AM »
I take it you want status change to be detected in real time, correct? :)

Yes, it's better if the status detected in real time  :Thmbsup:

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #9 on: August 10, 2022, 06:17 AM »
(Just had quite a time @ work, but release IS coming! :))
No news?  :-[

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono (ALPHA-20220811)
« Reply #10 on: August 12, 2022, 03:45 AM »
Hello & good day! Please test this ALPHA version with manual refresh:

https://github.com/publicdomain/mono-toggler/releases/tag/ALPHA-20220811

The PowerShell commands were updated to run as .NET managed code :Thmbsup:
« Last Edit: August 12, 2022, 04:52 AM by publicdomain »

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono (ALPHA-20220811)
« Reply #11 on: August 12, 2022, 06:30 AM »
Hello & good day! Please test this ALPHA version with manual refresh:

https://github.com/publicdomain/mono-toggler/releases/tag/ALPHA-20220811

The PowerShell commands were updated to run as .NET managed code :Thmbsup:
Sorry, it doesn't work. I gettoggler.PNG

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono (ALPHA-20220811)
« Reply #12 on: August 12, 2022, 06:36 AM »
Hello & good day! Please test this ALPHA version with manual refresh:

https://github.com/publicdomain/mono-toggler/releases/tag/ALPHA-20220811

The PowerShell commands were updated to run as .NET managed code :Thmbsup:
I think MS Visual c++ redistributable is correctly installed ...

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #13 on: August 12, 2022, 06:55 AM »
Please remove "MonoToggler.exe.config" file.

Also, you may want to retry running it as admin to be able to restart "Audiosrv" service.

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #14 on: August 12, 2022, 06:59 AM »
Please remove "MonoToggler.exe.config" file.

Also, you may want to retry running it as admin to be able to restart "Audiosrv" service.
Tried renaming .config to config.old and running as administrator I get Error when enabling "no se puede iniciar el servicio Audiosrv en el equipo ...

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #15 on: August 12, 2022, 08:56 AM »
Please remove "MonoToggler.exe.config" file.

Also, you may want to retry running it as admin to be able to restart "Audiosrv" service.
Tried renaming .config to config.old and running as administrator I get Error when enabling "no se puede iniciar el servicio Audiosrv en el equipo ...
I get this messages
"La configuración de permisos específico de la aplicación no concede el permiso Activación Local para la aplicación de servidor COM con CLSID
{3A8B5A92-80B0-48B3-8197-701ECD3261E4}
y APPID
{F135BE18-BF34-4CBD-B1D5-55D49F0DEDCC}
al usuario NT AUTHORITY\SYSTEM con SID (S-1-5-18) en la dirección LocalHost (con LRPC) que se ejecuta en el contenedor de aplicaciones con SID No disponible (No disponible). Este permiso de seguridad se puede modificar mediante la herramienta administrativa Servicios de componentes."
« Last Edit: August 12, 2022, 04:32 PM by toniash »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #16 on: August 12, 2022, 07:23 PM »
Thanks for your report. Audiosrv restart should be fixed :up:

Please retry with ALPHA02:

https://github.com/publicdomain/mono-toggler/releases/tag/ALPHA02

1) Unzip
2) Right-click / Run as administrator
3) Provide feedback here! :)

Cheers!

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #17 on: August 13, 2022, 12:47 AM »
Thanks for your report. Audiosrv restart should be fixed :up:

Please retry with ALPHA02:

https://github.com/publicdomain/mono-toggler/releases/tag/ALPHA02

1) Unzip
2) Right-click / Run as administrator
3) Provide feedback here! :)

Cheers!
Now it works running as admin
Is it possible Change the text to "MONO press to stereo" & "STEREO press to mono"?
File -> Refresh means reading the status in the register? (Better F5 than CTRL+N)
I would like run it at autostart but how do I run it as admin?
Thanks  :)
« Last Edit: August 13, 2022, 09:56 AM by toniash »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
    • Participated in NANY Challenge Three Times
    • Linux User
Re: IDEA: button for toggling stereo <-> mono
« Reply #18 on: August 14, 2022, 09:01 PM »
Here is latest ALPHA03 release: https://github.com/publicdomain/mono-toggler/releases/tag/ALPHA03

Is it possible Change the text to "MONO press to stereo" & "STEREO press to mono"?

Done!

MonoToggler_ALPHA03-2022-08-14.png

File -> Refresh means reading the status in the register? (Better F5 than CTRL+N)

Yes, File/Refresh = registry value read + update. Correct & done!

MonoToggler_ALPHA03_file-refresh.png

I would like run it at autostart but how do I run it as admin?

You may want to follow a tutorial such as this:

https://bootpanic.com/how-to-run-a-program-as-an-administrator-at-startup-on-windows-10-duplicate/

Thanks  :)

My pleasure! We're here to help each other 🤗
« Last Edit: August 14, 2022, 09:47 PM by publicdomain »

toniash

  • Participant
  • Joined in 2022
  • *
  • Posts: 12
Re: IDEA: button for toggling stereo <-> mono
« Reply #19 on: August 15, 2022, 07:17 AM »
Great  :-*
That"s what I needed!

Original address: https://www.donationcoder.com/forum/index.php?topic=52558.0