mumble-voip/mumble — pull request #171 by cbs228 (2013-08-12 02:37:01+00:00)
Title: PulseAudio: Cork audio input when it isn't needed

As noted in https://sourceforge.net/p/mumble/bugs/868/ , mumble consumes a great deal of CPU when it is idle. The vast majority of this usage can be traced to the audio input DSP. When mumble is self-muted, these operations are largely unnecessary and unhelpful. To save CPU, the audio input stream can be "corked" (muted) when it is not needed. This blocks the audio input DSP when it isn't needed.

This update automatically corks the PulseAudio input when the user is self-muted. In order to do this, MainWindow emits a new signal, corkStream(bool), whenever the audio input is or is not required. This signal is slotted by the PulseAudio source, which passes it to the underlying PulseAudio server. This implementation will enable the fix to be ported to other sound servers and systems (i.e., Windows).

A downside to this fix is that the AEC will stop updating while Mumble is muted. If the user is truly idling or AFK, however, there probably won't be much sound with which to update it. While this patch appears to work, I would welcome more widespread testing.