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-12 07:33:45 +0300
committerAlex Marsev <alex.marsev@gmail.com>2015-10-12 17:14:42 +0300
commit4f4f004de4bfc6bc75353bac22b56a7f42455fef (patch)
tree44d0c88544f015c2b1901830f8e3eb92025be30a
parent57221945b1970f429c50b5005bc10238e18e1e29 (diff)
Restore compatibility with VS2013
-rw-r--r--src/DspMatrix.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/DspMatrix.cpp b/src/DspMatrix.cpp
index afa6b03..14ec071 100644
--- a/src/DspMatrix.cpp
+++ b/src/DspMatrix.cpp
@@ -55,6 +55,7 @@ namespace SaneAudioRenderer
std::array<float, 18 * 18> BuildFullMatrix(DWORD inputMask, DWORD outputMask)
{
+ const float fullPower = 1.0f;
const float halfPower = 0.707113564f;
std::array<float, 18 * 18> matrix{};
@@ -65,7 +66,7 @@ namespace SaneAudioRenderer
matrix[18 * IndexForChannel(c) + IndexForChannel(c)] = 1.0f;
}
- auto feed = [&](DWORD sourceChannel, DWORD targetChannel, float multiplier = 1.0f)
+ auto feed = [&](DWORD sourceChannel, DWORD targetChannel, float multiplier)
{
float* source = matrix.data() + 18 * IndexForChannel(sourceChannel);
float* target = matrix.data() + 18 * IndexForChannel(targetChannel);
@@ -84,13 +85,13 @@ namespace SaneAudioRenderer
{
if (!(outputMask & SPEAKER_SIDE_LEFT))
{
- feed(SPEAKER_SIDE_LEFT, SPEAKER_BACK_LEFT);
+ feed(SPEAKER_SIDE_LEFT, SPEAKER_BACK_LEFT, fullPower);
clear(SPEAKER_SIDE_LEFT);
}
if (!(outputMask & SPEAKER_SIDE_RIGHT))
{
- feed(SPEAKER_SIDE_RIGHT, SPEAKER_BACK_RIGHT);
+ feed(SPEAKER_SIDE_RIGHT, SPEAKER_BACK_RIGHT, fullPower);
clear(SPEAKER_SIDE_RIGHT);
}
}
@@ -108,11 +109,11 @@ namespace SaneAudioRenderer
{
if (outputMask & SPEAKER_BACK_CENTER)
{
- feed(SPEAKER_BACK_LEFT, SPEAKER_BACK_CENTER);
+ feed(SPEAKER_BACK_LEFT, SPEAKER_BACK_CENTER, fullPower);
}
else if (outputMask & SPEAKER_SIDE_LEFT)
{
- feed(SPEAKER_BACK_LEFT, SPEAKER_SIDE_LEFT);
+ feed(SPEAKER_BACK_LEFT, SPEAKER_SIDE_LEFT, fullPower);
}
else
{
@@ -126,11 +127,11 @@ namespace SaneAudioRenderer
{
if (outputMask & SPEAKER_BACK_CENTER)
{
- feed(SPEAKER_BACK_RIGHT, SPEAKER_BACK_CENTER);
+ feed(SPEAKER_BACK_RIGHT, SPEAKER_BACK_CENTER, fullPower);
}
else if (outputMask & SPEAKER_SIDE_RIGHT)
{
- feed(SPEAKER_BACK_RIGHT, SPEAKER_SIDE_RIGHT);
+ feed(SPEAKER_BACK_RIGHT, SPEAKER_SIDE_RIGHT, fullPower);
}
else
{