According to the JACK specification the process callback cannot have anything that could block.
JACK can also kill the process thread while it is holding the lock which can cause a deadlock.
This prevents both deadlocks in Mumble and xruns in the JACK processes.
There have also been some changes to the order in which the JACK clients get activated.
This is to make sure that they are fully set up before the activate function is called.
This prevents graph errors from showing up in the JACK logs.
The code accessed a variable ("nxboxinput") even when not existent, resulting in compiler errors.
This commit fixes the issue by adding the missing checks.
Try to remove the ability to join a full channel by
creating a temporary sub channel then joining it
and removing it (discovered by @Natenom).
Check isChannelFull in addition to existing
hasPermissions ChanACL::Enter check.
We check for the following libraries:
- Windows: "libjack64.dll" and "libjack32.dll". Those are the libraries that are shipped with the official installer, which copies them in "C:\Windows".
- macOS: "libjack.dylib" and "libjack.0.dylib".
- Everything else: "libjack.so" and "libjack.so.0".
This commit also:
- Adds a debug message so that a user knows which library was loaded and its version.
- Renames "inputBuffer" to "outputBuffer" in JackAudioOutput::process(), the previous name was only correct from the perspective of the JACK port.
- Renames "input" to "inputBuffer" in JackAudioInput::process(), the previous name was unclear.
If during message handling we somehow end up in a situation
where no ClientUser is registered or g.uiSession is not set
we end up with pSelf as a null pointer. Dereferncing that
crashes the application.
Similar to other objects we retrieve for message processing
this patch modified the macro to log and bail if we encounter
this situation instead of crashing.
One drawback of this patch is that it might make state
corruption caused by client bugs less visible to us because
we no longer receive crash reports on them while the client
functionality could still be degraded severly.
The protocol requires that a server sends all client information
before sending the sync message that indicates state is matching.
Before this patch violating this condition could bring the client
into a bad state where a connection was established but the client's
user object not existing. Now the client disconnects itself if
such an issue occurs.
While this should not occur the client did not properly
consider what would happen if a server sent a ChannelRemove
without first moving all users out. Allowing this operation
to happen will bring our UserModel into an undefined state
where users (even ourselves) might have been dropped while
the server still considers them.
With this patch we now detect that case and disconnect ourselves
from the broken server instead of breaking our state.
CELT 0.11.0 provides better quality in comparison to CELT 0.7.0, but the two versions of the codecs are not compatible, which is why we provided both of them.
Opus was introduced in Mumble 1.2.4 (7586a61226), thus we expect that most (if not all) users are using it.
By removing CELT 0.11.0 we don't break backwards compatibility, because it's provided by CELT 0.7.0.
The main reason for removing the codec is the fact that its discontinued (in favor of Opus).
Also, CELT 0.11.0 was removed from the Debian package back in 2012: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682010
Fixes the following error:
TaskList.cpp:77:20: error: 'SHARD_LINK' was not declared in this scope
SHAddToRecentDocs(SHARD_LINK, link);
^
"SHARD_LINK" is only defined when "NTDDI_VERSION" is at least "NTDDI_WIN7" (0x06010000).
We handle the logic for MinGW in "win.h", this commit fixes the error by including it.
By default QTime uses the 24-hour time format when converting to a string.
This commit adds a setting (a checkbox) which allows users to toggle the format.
The setting only applies for new messages, the already shown ones will retain the previous time format.
Qt 4 used a different implementation because QDnsLookup was introduced in Qt 5.
Unlike the complete implementation, the Qt 4 compatible one only supported simple lookups (e.g. hostname -> IP address).
Mumble.com kindly reported that the getRegistration() Ice method fails with an "enumerator out of range" error, due to a missing value in the "UserInfo" enum.
The value was added to Murmur in 813aceb854 and then renamed and moved in 5131d9e303.
Some users were encountering issues such as the client taking ~8 seconds to start when "jackd" could not be run, due to the library attempting many times to connect to the JACK server (https://bugs.debian.org/941455).
While working on a fix I corrected the many warnings emitted by Clang-Tidy and I realized that there were many things that could be improved.
This commit almost entirely rewrites the implementation, but here are some of the changes:
- Mutexes are used everywhere, race conditions should not be possible anymore.
- The JACK client is not opened until it's required (i.e. "JackAudioInput" and/or "JackAudioOutput" start running). The initialization code has been moved to a dedicated function, the constructor doesn't execute it anymore. This is what fixes the issue mentioned above.
- The JACK client is deactivated and closed automatically when both "JackAudioInput" and "JackAudioOutput" are not running.
- Code specific to audio input or audio output has been moved from "JackAudioSystem" to the corresponding section ("JackAudioInput" or "JackAudioOutput").
- Some variables in "JackAudioSystem" have been replaced with functions which retrieve the corresponding value from the JACK server.
- Removed all instances of "delete", raw pointers have been replaced with "std::unique_ptr<>()".
- Replaced "NULL" with "nullptr".
This commit fixes a warning encountered today on FreeBSD, probably because Clang was updated and now `-Wdangling-else` is enabled by default.
Messages.cpp:1330:5: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
foreach(int id, pg->members()) {
^
I just had a FreeBSD build fail because AudioStats.cpp is using QPalette::Background, which apparently has been declared deprecated.
AudioStats.cpp:213:45: error: 'Background' is deprecated: Use QPalette::Window instead [-Werror,-Wdeprecated-declarations]
paint.fillRect(rect(), pal.color(QPalette::Background));
^
The Qt docs advise to use QPalette::Window instead (see https://doc.qt.io/qt-5/qpalette.html), so I went ahead and changed the code accordingly.
This commit fixes a warning encountered today on FreeBSD, probably because Clang was updated and now '-Wdangling-else' is enabled by default.
ConnectDialog.cpp:1178:3: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
foreach(ServerItem *si, qlItems)
^
The suggestion to use DirectSound was valid only for Windows versions prior to Vista, because WASAPI was introduced with it.
Fortunately DirectSound didn't appear in the UI as an option in case WASAPI was detected, hopefully we didn't mislead users into thinking that DirectSound is better than WASAPI.
Also, the description was suggesting to use DirectSound on non-Windows operating systems.
DirectSound was the first audio backend supported by Mumble, in 2005.
Windows Vista introduced a brand new audio stack called WASAPI, which entirely replaced DirectSound. Support for it was added in 9a018148bb, 6bef650e57 and 677a39951f.
This commit entirely removes our DirectSound implementation, not needed anymore because we are dropping support for Windows XP in 1.4.