Merge PR #5247: FEAT(client): Warn for pos. audio with mono output

As requested in #5238 this commit adds a warning message in the chat
when positional audio is enabled on mono output device.

Fixes #5238
This commit is contained in:
Robert Adam 2022-09-09 11:27:33 +02:00 committed by GitHub
commit 264eac3b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 181 additions and 0 deletions

View File

@ -10,6 +10,7 @@
#include "AudioOutputSpeech.h"
#include "Channel.h"
#include "ChannelListenerManager.h"
#include "Log.h"
#include "PluginManager.h"
#include "ServerHandler.h"
#include "Timer.h"
@ -344,6 +345,10 @@ void AudioOutput::initializeMixer(const unsigned int *chanmasks, bool forceheadp
}
iSampleSize = static_cast< int >(iChannels * ((eSampleFormat == SampleFloat) ? sizeof(float) : sizeof(short)));
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!"));
}
}
bool AudioOutput::mix(void *outbuff, unsigned int frameCount) {

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1429,6 +1429,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Aquest valor us permet establir el nombre màxim d&apos;usuaris permesos al cana
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Tato hodnota Vám umožňuje nastavit maximální počet povolených uživatelů
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1429,6 +1429,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1435,6 +1435,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Dieser Wert erlaubt das Einstellen der maximal im Kanal erlaubten Benutzeranzahl
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Este valor permite fijar el número máximo de usuarios permitidos en el canal.
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1429,6 +1429,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1438,6 +1438,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Tämän numeron ollessa suurempi kuin nolla kanava sallii enintään numeron suu
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Cette valeur vous permet de définir un nombre maximum d&apos;utilisateurs autor
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1430,6 +1430,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1437,6 +1437,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1432,6 +1432,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Questo valore ti permette di impostare il numero massimo di utenti consentiti ne
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1437,6 +1437,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1431,6 +1431,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Deze waarde laat je toe om een maximum aantal gebruikers in te stellen voor het
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1438,6 +1438,10 @@ Når du er lenger unna enn dette vil andres stemme ikke bli dempet ytterligere.<
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1429,6 +1429,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Określa maksymalną dozwoloną liczbę użytkowników na tym kanale. Jeżeli wa
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Este valor permite que você especifique o número máximo de usuárias permitid
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Este valor permite definir o número máximo de utilizadores permitido no canal.
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1432,6 +1432,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1422,6 +1422,10 @@ Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1422,6 +1422,10 @@ Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;
<source>&lt;b&gt;This enables one of the loopback test modes.&lt;/b&gt;&lt;br /&gt;&lt;i&gt;None&lt;/i&gt; - Loopback disabled&lt;br /&gt;&lt;i&gt;Local&lt;/i&gt; - Emulate a local server.&lt;br /&gt;&lt;i&gt;Server&lt;/i&gt; - Request loopback from server.&lt;br /&gt;Please note than when loopback is enabled, no other users will hear your voice. This setting is not saved on application exit.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1424,6 +1424,10 @@ Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Det värdet tillåter dig att ställa in ett maximalt antal av användare som ä
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1434,6 +1434,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ Bu değer kanalda izin verilen azami kullanıcı sayısını ayarlamanıza izin
<source> m</source>
<translation> m</translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1436,6 +1436,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation> </translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1428,6 +1428,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>

View File

@ -1431,6 +1431,10 @@ This value allows you to set the maximum number of users allowed in the channel.
<source> m</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Positional audio cannot work with mono output devices!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AudioOutputDialog</name>