From 6ce9bf6c9441503bc7e7c3451f0954cbdfbeb6ab Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Fri, 12 Jun 2020 11:58:41 -0700
Subject: Move a couple related functions to the backend base

---
 alc/alc.cpp | 122 ------------------------------------------------------------
 1 file changed, 122 deletions(-)

(limited to 'alc/alc.cpp')

diff --git a/alc/alc.cpp b/alc/alc.cpp
index 74fed67a..c996ecf8 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -1501,128 +1501,6 @@ const std::array<InputRemixMap,1> X71Downmix{{
  * Miscellaneous ALC helpers
  ************************************************/
 
-void SetDefaultWFXChannelOrder(ALCdevice *device)
-{
-    device->RealOut.ChannelIndex.fill(INVALID_CHANNEL_INDEX);
-
-    switch(device->FmtChans)
-    {
-    case DevFmtMono:
-        device->RealOut.ChannelIndex[FrontCenter] = 0;
-        break;
-    case DevFmtStereo:
-        device->RealOut.ChannelIndex[FrontLeft]  = 0;
-        device->RealOut.ChannelIndex[FrontRight] = 1;
-        break;
-    case DevFmtQuad:
-        device->RealOut.ChannelIndex[FrontLeft]  = 0;
-        device->RealOut.ChannelIndex[FrontRight] = 1;
-        device->RealOut.ChannelIndex[BackLeft]   = 2;
-        device->RealOut.ChannelIndex[BackRight]  = 3;
-        break;
-    case DevFmtX51:
-        device->RealOut.ChannelIndex[FrontLeft]   = 0;
-        device->RealOut.ChannelIndex[FrontRight]  = 1;
-        device->RealOut.ChannelIndex[FrontCenter] = 2;
-        device->RealOut.ChannelIndex[LFE]         = 3;
-        device->RealOut.ChannelIndex[SideLeft]    = 4;
-        device->RealOut.ChannelIndex[SideRight]   = 5;
-        break;
-    case DevFmtX51Rear:
-        device->RealOut.ChannelIndex[FrontLeft]   = 0;
-        device->RealOut.ChannelIndex[FrontRight]  = 1;
-        device->RealOut.ChannelIndex[FrontCenter] = 2;
-        device->RealOut.ChannelIndex[LFE]         = 3;
-        device->RealOut.ChannelIndex[BackLeft]    = 4;
-        device->RealOut.ChannelIndex[BackRight]   = 5;
-        break;
-    case DevFmtX61:
-        device->RealOut.ChannelIndex[FrontLeft]   = 0;
-        device->RealOut.ChannelIndex[FrontRight]  = 1;
-        device->RealOut.ChannelIndex[FrontCenter] = 2;
-        device->RealOut.ChannelIndex[LFE]         = 3;
-        device->RealOut.ChannelIndex[BackCenter]  = 4;
-        device->RealOut.ChannelIndex[SideLeft]    = 5;
-        device->RealOut.ChannelIndex[SideRight]   = 6;
-        break;
-    case DevFmtX71:
-        device->RealOut.ChannelIndex[FrontLeft]   = 0;
-        device->RealOut.ChannelIndex[FrontRight]  = 1;
-        device->RealOut.ChannelIndex[FrontCenter] = 2;
-        device->RealOut.ChannelIndex[LFE]         = 3;
-        device->RealOut.ChannelIndex[BackLeft]    = 4;
-        device->RealOut.ChannelIndex[BackRight]   = 5;
-        device->RealOut.ChannelIndex[SideLeft]    = 6;
-        device->RealOut.ChannelIndex[SideRight]   = 7;
-        break;
-    case DevFmtAmbi3D:
-        device->RealOut.ChannelIndex[Aux0] = 0;
-        if(device->mAmbiOrder > 0)
-        {
-            device->RealOut.ChannelIndex[Aux1] = 1;
-            device->RealOut.ChannelIndex[Aux2] = 2;
-            device->RealOut.ChannelIndex[Aux3] = 3;
-        }
-        if(device->mAmbiOrder > 1)
-        {
-            device->RealOut.ChannelIndex[Aux4] = 4;
-            device->RealOut.ChannelIndex[Aux5] = 5;
-            device->RealOut.ChannelIndex[Aux6] = 6;
-            device->RealOut.ChannelIndex[Aux7] = 7;
-            device->RealOut.ChannelIndex[Aux8] = 8;
-        }
-        if(device->mAmbiOrder > 2)
-        {
-            device->RealOut.ChannelIndex[Aux9]  = 9;
-            device->RealOut.ChannelIndex[Aux10] = 10;
-            device->RealOut.ChannelIndex[Aux11] = 11;
-            device->RealOut.ChannelIndex[Aux12] = 12;
-            device->RealOut.ChannelIndex[Aux13] = 13;
-            device->RealOut.ChannelIndex[Aux14] = 14;
-            device->RealOut.ChannelIndex[Aux15] = 15;
-        }
-        break;
-    }
-}
-
-void SetDefaultChannelOrder(ALCdevice *device)
-{
-    device->RealOut.ChannelIndex.fill(INVALID_CHANNEL_INDEX);
-
-    switch(device->FmtChans)
-    {
-    case DevFmtX51Rear:
-        device->RealOut.ChannelIndex[FrontLeft]   = 0;
-        device->RealOut.ChannelIndex[FrontRight]  = 1;
-        device->RealOut.ChannelIndex[BackLeft]    = 2;
-        device->RealOut.ChannelIndex[BackRight]   = 3;
-        device->RealOut.ChannelIndex[FrontCenter] = 4;
-        device->RealOut.ChannelIndex[LFE]         = 5;
-        return;
-    case DevFmtX71:
-        device->RealOut.ChannelIndex[FrontLeft]   = 0;
-        device->RealOut.ChannelIndex[FrontRight]  = 1;
-        device->RealOut.ChannelIndex[BackLeft]    = 2;
-        device->RealOut.ChannelIndex[BackRight]   = 3;
-        device->RealOut.ChannelIndex[FrontCenter] = 4;
-        device->RealOut.ChannelIndex[LFE]         = 5;
-        device->RealOut.ChannelIndex[SideLeft]    = 6;
-        device->RealOut.ChannelIndex[SideRight]   = 7;
-        return;
-
-    /* Same as WFX order */
-    case DevFmtMono:
-    case DevFmtStereo:
-    case DevFmtQuad:
-    case DevFmtX51:
-    case DevFmtX61:
-    case DevFmtAmbi3D:
-        SetDefaultWFXChannelOrder(device);
-        break;
-    }
-}
-
-
 void ALCcontext::processUpdates()
 {
     std::lock_guard<std::mutex> _{mPropLock};
-- 
cgit v1.2.3