mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Merge PR #6510: FIX(client): Fix crash on mono pos. audio warning from audio thread
This commit is contained in:
commit
4985b18d6b
@ -415,7 +415,7 @@ void AudioOutput::initializeMixer(const unsigned int *chanmasks, bool forceheadp
|
||||
qWarning("AudioOutput: Initialized %d channel %d hz mixer", iChannels, iMixerFreq);
|
||||
|
||||
if (Global::get().s.bPositionalAudio && iChannels == 1) {
|
||||
Global::get().l->logOrDefer(Log::Warning, tr("Positional audio cannot work with mono output devices!"));
|
||||
Log::logOrDefer(Log::Warning, tr("Positional audio cannot work with mono output devices!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -707,6 +707,15 @@ QString Log::validHtml(const QString &html, QTextCursor *tc) {
|
||||
|
||||
void Log::log(MsgType mt, const QString &console, const QString &terse, bool ownMessage, const QString &overrideTTS,
|
||||
bool ignoreTTS) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
// Invoke in main thread in order to keep the Qt gods on our side by not calling any UI
|
||||
// functions from a separate thread (can lead to program crashes)
|
||||
QMetaObject::invokeMethod(this, "log", Qt::QueuedConnection, Q_ARG(Log::MsgType, mt),
|
||||
Q_ARG(const QString &, console), Q_ARG(const QString &, terse),
|
||||
Q_ARG(bool, ownMessage), Q_ARG(const QString &, overrideTTS), Q_ARG(bool, ignoreTTS));
|
||||
return;
|
||||
}
|
||||
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
|
||||
int ignore = qmIgnore.value(mt);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user