Open Rehi146 opened 5 years ago
Maybe there are more processes like this. Better check it out.
... a bit late, but this is only true for the System Sounds. 😇
It is caused by session._ctl.GetProcessId() == 0
for the System Sounds. (see pycaw.utils AudioSession)
Btw, a session's ._ctl.IsSystemSoundsSession()
return 1 for everything except for the actual "system sounds" session, which returns a 0.
Shouldn't it be the opposite ? or changing it now would cause some code to behave badly ?
An example: sessions = AudioUtilities.GetAllSessions() print(get_time() + "Audio device volume is set to max, Setting processes volume:") for session in sessions: interface = session.SimpleAudioVolume if interface.GetMasterVolume() <= 0.99: interface.SetMasterVolume(interface.GetMasterVolume() + 0.01, None) name = "Can't get process name: " if session.Process: # If it's not None, otherwise session.Process.name() would crash the program name = session.Process.name() print(name + ": volume changed to " + str(int(interface.GetMasterVolume() * 100)) + "%")