Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/sanear.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Marsev <alex.marsev@gmail.com>2015-10-09 23:52:31 +0300
committerAlex Marsev <alex.marsev@gmail.com>2015-10-09 23:54:48 +0300
commitf3a0c48946cee972fa971dce279379a92db87db1 (patch)
tree8d01a133f29ed94a5d85acca949b49f0e632c218
parent20875f67c66619184a7aa108466abbdd171f368c (diff)
Work around common audio drivers bug
-rw-r--r--src/AudioDeviceManager.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/AudioDeviceManager.cpp b/src/AudioDeviceManager.cpp
index 451c997..4bbde98 100644
--- a/src/AudioDeviceManager.cpp
+++ b/src/AudioDeviceManager.cpp
@@ -272,11 +272,20 @@ namespace SaneAudioRenderer
BOOL crossfeedEnabled;
pSettings->GetCrossfeedEnabled(&crossfeedEnabled);
- std::vector<WAVEFORMATEXTENSIBLE> priorities = {
+ std::deque<WAVEFORMATEXTENSIBLE> priorities = {
BuildWaveFormatExt(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 32, 32,
mixRate, inputChannels, inputMask),
};
+ // Prefer 7.1 over 6.1 because of widespread audio driver bugs.
+ // No impact on audio quality.
+ if (inputMask == (KSAUDIO_SPEAKER_5POINT1 | SPEAKER_BACK_CENTER))
+ {
+ assert(inputChannels == 7);
+ priorities.push_front(BuildWaveFormatExt(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 32, 32,
+ mixRate, 8, KSAUDIO_SPEAKER_7POINT1_SURROUND));
+ }
+
// Shift between 5.1 with side channels and 5.1 with back channels.
if (inputMask == KSAUDIO_SPEAKER_5POINT1 ||
inputMask == ShiftBackSide(KSAUDIO_SPEAKER_5POINT1))