Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

The microphone and volume levels are reset when the application starts #98

Closed
im1x opened this issue Nov 20, 2022 · 16 comments
Closed

The microphone and volume levels are reset when the application starts #98

im1x opened this issue Nov 20, 2022 · 16 comments

Comments

@im1x
Copy link

im1x commented Nov 20, 2022

This problem appeared after the last update.
demo

Version: 1.0.242.0
Windows 10.0.19045.2251
MicSwitch.release.2022-11-20.1(part).log

@AngryJKirk
Copy link

AngryJKirk commented Nov 25, 2022

Same issue here
1.0.240.0 is working fine, so the bug occurred since the 1.0.242.0

@Hansworst85
Copy link

Same

@Playnot
Copy link

Playnot commented Dec 22, 2022

Same for me, except every device (microphone and playback) goes to 0.
Was on same Windows version, but the problem is also present on 19045.2364

@Jasongt93
Copy link

Same here... issue on 1.0.242.0

@iXab3r
Copy link
Owner

iXab3r commented Jan 3, 2023

hi guys, got back from vacation, working on it

@iXab3r
Copy link
Owner

iXab3r commented Jan 4, 2023

Done the change, if you can - please help me to test it out, I'll publish new release to github as soon as will be sure that it's stable, probably on a weekend https://eyeauras.blob.core.windows.net/shared/MicSwitchSetup.1.0.248.exe

@im1x
Copy link
Author

im1x commented Jan 4, 2023

Done the change, if you can - please help me to test it out, I'll publish new release to github as soon as will be sure that it's stable, probably on a weekend https://eyeauras.blob.core.windows.net/shared/MicSwitchSetup.1.0.248.exe

This breaks the volume control. When I change the volume it jumps back to the old level.
PvnXSl4wT7

@iXab3r
Copy link
Owner

iXab3r commented Jan 4, 2023

got it, thanks
created new issue - it's not really related to this bug as I've not touched how Output volume control is working
#101

@im1x
Copy link
Author

im1x commented Jan 4, 2023

got it, thanks created new issue - it's not really related to this bug as I've not touched how Output volume control is working #101

No, this problem is only in 1.0.248, 1.0.240 and 1.0.242 don't have it, I just checked it.

@im1x
Copy link
Author

im1x commented Jan 4, 2023

Done the change, if you can - please help me to test it out, I'll publish new release to github as soon as will be sure that it's stable, probably on a weekend https://eyeauras.blob.core.windows.net/shared/MicSwitchSetup.1.0.248.exe

Found another problem. When you start the program, it sets the volume and microphone level as it was when you last exited the program.
For example:

  1. The program is running and the volume and microphone are set to 10%;
  2. Close the program;
  3. Change the volume and microphone level by 30%;
  4. Run the program and it will change the levels by 10%;
    9QSEZuPFcs

@iXab3r
Copy link
Owner

iXab3r commented Jan 4, 2023

Not a problem - this is an expected behaviour, I've described why it was done this way in Discord:

background of this problem is the following: consider you have multiple devices which ALL have their own Mute/Volume states. If you work with a single device getting and setting Volume and Mute state is trivial, but as soon as there are >1 devices involved it gets tricky as it becomes possible that their state will be desynced with each other thus making it not possible to calculate "combined" correct state of either of these values.

Previous solution was obviously wrong and it simply took minimum volume of all devices and propagated it to all other devices as well. This does not work well in way too many cases.
Current solution will be the following:

  1. if you control a single mic it's all good, I simply take Mute/Volume right from device
  2. if you switch to All devices from a single mic the I will take Mute/Volume of previously selected device and propagate it to all devices
  3. if you start a program with "All devices" being previously selected I will take Mute/Volume of FIRSTdevice in the list which is usually the oldest device installed to the system and it's Mute/Volume state will be propagated to other devices

There is an alternative way for #3 - I can remember last settings that were used and apply them on startup, but I do not think that it is better that my proposal above because it may mess up changes that you've made manually while program was not running
I think I'll go with alternative - i.e. if Volume Control is enabled MicSwitch will apply latest seen Volume to all devices on app start, in combination with option "Initial Mic State" it seems to be quite logical approach

@im1x
Copy link
Author

im1x commented Jan 4, 2023

Not a problem - this is an expected behaviour, I've described why it was done this way in Discord:

background of this problem is the following: consider you have multiple devices which ALL have their own Mute/Volume states. If you work with a single device getting and setting Volume and Mute state is trivial, but as soon as there are >1 devices involved it gets tricky as it becomes possible that their state will be desynced with each other thus making it not possible to calculate "combined" correct state of either of these values.

Previous solution was obviously wrong and it simply took minimum volume of all devices and propagated it to all other devices as well. This does not work well in way too many cases. Current solution will be the following:

  1. if you control a single mic it's all good, I simply take Mute/Volume right from device
  2. if you switch to All devices from a single mic the I will take Mute/Volume of previously selected device and propagate it to all devices
  3. if you start a program with "All devices" being previously selected I will take Mute/Volume of FIRSTdevice in the list which is usually the oldest device installed to the system and it's Mute/Volume state will be propagated to other devices

There is an alternative way for #3 - I can remember last settings that were used and apply them on startup, but I do not think that it is better that my proposal above because it may mess up changes that you've made manually while program was not running I think I'll go with alternative - i.e. if Volume Control is enabled MicSwitch will apply latest seen Volume to all devices on app start, in combination with option "Initial Mic State" it seems to be quite logical approach

Thanks for the detailed answer. You're right. It makes sense.

@iXab3r
Copy link
Owner

iXab3r commented Jan 7, 2023

Next iteration of changes (volume control stuttering is still there, do not consider it a blocker and will address) - https://eyeauras.blob.core.windows.net/shared/MicSwitchSetup.1.0.249.exe

@im1x
Copy link
Author

im1x commented Jan 7, 2023

Next iteration of changes (volume control stuttering is still there, do not consider it a blocker and will address) - https://eyeauras.blob.core.windows.net/shared/MicSwitchSetup.1.0.249.exe

It works well. I didn't find any problems.

@im1x
Copy link
Author

im1x commented Jan 8, 2023

Next iteration of changes (volume control stuttering is still there, do not consider it a blocker and will address) - https://eyeauras.blob.core.windows.net/shared/MicSwitchSetup.1.0.249.exe

An error has occurred. Error after waking PC from sleep mode. Most likely the error is related to updating the list of media devices (the monitor is connected via HDMI)
MicSwitch_1.0.249.0_release_202301081434495lbuRWqjQ7EH.zip

@iXab3r
Copy link
Owner

iXab3r commented Jan 11, 2023

should be fixed in 252, please reopen if it occurs again

@iXab3r iXab3r closed this as completed Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants