diff options
author | Kartik K Khullar <kartikkhullar840@gmail.com> | 2022-09-08 21:40:52 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2022-09-09 11:04:28 +0300 |
commit | 3c77f48cc745eb39aa0215d4dddb1d5a681a80a7 (patch) | |
tree | b326fff9fd3b5a2a63e0da51dc810274a83a079e /src/mumble | |
parent | a400356548681664f6a0110500002975ac68f16a (diff) |
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
Diffstat (limited to 'src/mumble')
-rw-r--r-- | src/mumble/AudioOutput.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mumble/AudioOutput.cpp b/src/mumble/AudioOutput.cpp index ca7f48b77..07a5d7dae 100644 --- a/src/mumble/AudioOutput.cpp +++ b/src/mumble/AudioOutput.cpp @@ -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) { |