In ClientUser::remove a QWriteLocker is created on
ClientUser::c_qrwlUsers in order to remove the respective user from
ClientUser::c_qmUsers.
However the lock is not released after that but it is instead held until
the function exits. This causes the lock to be held even when
AudioOutput::removeBuffer is being called. Apart from this being bad
practice, it can also lead to a deadlock (verified for the case in which
a ReadLock on ClientUser::c_qrwlUsers is being requested inside
AudioOutput::mix [after the lock on AudioOutput::qrwlOutputs has been
acquired]. This can happen if one calls e.g. ClientUser::get in that
function. In that case the deadlock can happen if audio is being
received and played while one or more users are disconnecting from the
server).
If we don't have a "servicePrefix" set, prefixedServiceHost() and
serviceHost() return the same host. The code however expected them to
implicitly be different.
This only ever made a difference if the main service host wasn't
reachable but in that case the endless-loop kicks in and the CPU usage
goes up.
Right now Mumble can come in a state where the local client is muted but
its talking state is still frozen to Talking.
This is also reflected in the UI (#4006) so this commit provides a
workaround that at least fixes the UI symptoms of the bug as I haven't
been able to track down the actual origin of it.
As requested in #2481, this commit introduces the option to print
changes of ACLs and/or groups to the server-log. These logs then contain
the ALCs/groups before the change and after it and should thereby grant
all information necessary to debug what is going on with them.
The most important change is to use a timer that is based on a monotonic
clock in order to avoid time jumps and this inconsistent measurements
of time intervals (see
https://github.com/mumble-voip/mumble/issues/3985#issuecomment-601754212).
Furthermore the code-style has been adapted (m_ prefix instead of usage
of this->) and documentation has been added / extended.
For some reason qFatal has been used to log information such as the
version requested by the --version argument.
abdb5004bb made qFatal exit with an
exit status of one leading to successful operations that happened
to contain some print-out to leave an exit status of 1 (#3911).
When self-muted or deafened, "cork" the audio input. Corking
instructs the audio source to stop producing audio samples which—
when the user is muted—are not needed and would never be
transmitted.
Without samples to process, the input DSP doesn't run. Corking can
halve mumble's CPU consumption when muted, but your mileage may
vary.
This patch adds the MainWindow::corkAudioInputStream() signal to
request changes in the corking state. Other audio backends could
be modified to connect to this signal.