diff options
-rw-r--r-- | alc/alc.cpp | 11 | ||||
-rw-r--r-- | alc/alu.cpp | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 125051c8..199934f9 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1416,6 +1416,15 @@ bool IsValidAmbiScaling(ALCenum scaling) * existing ones. Based on Wine's DSound downmix values, which are based on * PulseAudio's. */ +const std::array<InputRemixMap,7> MonoDownmix{{ + { FrontLeft, {{{FrontCenter, 0.5f}, {LFE, 0.0f}}} }, + { FrontRight, {{{FrontCenter, 0.5f}, {LFE, 0.0f}}} }, + { SideLeft, {{{FrontCenter, 0.5f/9.0f}, {LFE, 0.0f}}} }, + { SideRight, {{{FrontCenter, 0.5f/9.0f}, {LFE, 0.0f}}} }, + { BackLeft, {{{FrontCenter, 0.5f/9.0f}, {LFE, 0.0f}}} }, + { BackRight, {{{FrontCenter, 0.5f/9.0f}, {LFE, 0.0f}}} }, + { BackCenter, {{{FrontCenter, 1.0f/9.0f}, {LFE, 0.0f}}} }, +}}; const std::array<InputRemixMap,6> StereoDownmix{{ { FrontCenter, {{{FrontLeft, 0.5f}, {FrontRight, 0.5f}}} }, { SideLeft, {{{FrontLeft, 1.0f/9.0f}, {FrontRight, 0.0f}}} }, @@ -1983,13 +1992,13 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) switch(device->FmtChans) { + case DevFmtMono: device->RealOut.RemixMap = MonoDownmix; break; case DevFmtStereo: device->RealOut.RemixMap = StereoDownmix; break; case DevFmtQuad: device->RealOut.RemixMap = QuadDownmix; break; case DevFmtX51: device->RealOut.RemixMap = X51Downmix; break; case DevFmtX51Rear: device->RealOut.RemixMap = X51RearDownmix; break; case DevFmtX61: device->RealOut.RemixMap = X61Downmix; break; case DevFmtX71: device->RealOut.RemixMap = X71Downmix; break; - case DevFmtMono: case DevFmtAmbi3D: break; } diff --git a/alc/alu.cpp b/alc/alu.cpp index 227ab575..4b2a5c26 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -934,8 +934,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat xpos, const ALfloat ypo } } } - else if(DirectChannels != DirectMode::Off && Device->FmtChans != DevFmtMono - && Device->FmtChans != DevFmtAmbi3D) + else if(DirectChannels != DirectMode::Off && Device->FmtChans != DevFmtAmbi3D) { /* Direct source channels always play local. Skip the virtual channels * and write inputs to the matching real outputs. |