Connection status client and gui can get out of sync.
Describe the bug
There are several occasions where Client connection and GUI can get out of sync. If this is the case the gui will show connected state (and disconnect button) while still connected or the gui will show disconnected state (and connect button) while not connected. Also there are cases where GUI shows the "Disconnect" button, but opens the "Connect" dialog when pressed.
To Reproduce
This mostly happens when you change to an invalid device while connected. It also happens in other cases of device errors but these are harder to reproduce.
Expected behavior
GUI should always show the correct state.
Screenshots
Operating system
Version of Jamulus All Jamulus versions
Additional context
I finally found the problem (after a long time), And there are two causes: 1: Connect/Disconnect is implemented in the CClientDlg code, with a lot of calls to CClient (Doesn't belong here, since this is not GUI functionality.) 2: Some functions in CCLient have ambiguous names, so wrong functions are used to check if connected (actually checking Sound.IsStarted)
This issue will be solved in my "sound re-design" repo.
Which we also see in https://github.com/jamulussoftware/jamulus/pull/3249
I hope we'll get to a better design in Jamulus 4