surroundize

Tool/PipeWire filter to convert stereo audio to surround
git clone https://git.neptards.moe/u3shit/surroundize.git
Log | Files | Refs | README | LICENSE

channel.hpp (1773B)


      1 #ifndef GUARD_QUICK_AS_A_FLASH_NONTABBED_GAMBO_BRAIRDS_7643
      2 #define GUARD_QUICK_AS_A_FLASH_NONTABBED_GAMBO_BRAIRDS_7643
      3 #pragma once
      4 
      5 // Freesurround note from https://hydrogenaud.io/index.php/topic,52235.0.html
      6 // There is one little catch with the more exotic channels: foobar2000 (or
      7 // Windows) do not expose some of the rarely used positions but instead allow to
      8 // connect "top" speakers (meant for the ceiling). Therefore there is a bit of
      9 // remapping going on for these positions: If you have 'side front left'/'side
     10 // front right' speakers, connect them to the 'top front left'/'top front right'
     11 // channels, if you have 'side back left/right' connect them to 'top back
     12 // left/right', and if you have 'back center left/right' speakers you need to
     13 // connect them to the 'top front center' and 'top back center' channels,
     14 // respectively.
     15 
     16 namespace Channel
     17 {
     18   enum E // same order as pipewire
     19   {
     20     FRONT_LEFT, FRONT_RIGHT,
     21     FRONT_CENTER, LFE,
     22     SIDE_LEFT, SIDE_RIGHT,
     23     FRONT_LEFT_CENTER, FRONT_RIGHT_CENTER,
     24     REAR_CENTER,
     25     REAR_LEFT, REAR_RIGHT,
     26     // TOP_*
     27     REAR_LEFT_CENTER, REAR_RIGHT_CENTER,
     28     // Not in Pipewire:
     29     SIDE_FRONT_LEFT, SIDE_FRONT_RIGHT,
     30     SIDE_BACK_LEFT, SIDE_BACK_RIGHT,
     31     N_CHANNELS
     32   };
     33 
     34   constexpr inline const char* NAMES_PIPEWIRE[N_CHANNELS] = {
     35     [FRONT_LEFT] = "FL", [FRONT_RIGHT] = "FR",
     36     [FRONT_CENTER] = "FC", [LFE] = "LFE",
     37     [SIDE_LEFT] = "SL", [SIDE_RIGHT] = "SR",
     38     [FRONT_LEFT_CENTER] = "FLC", [FRONT_RIGHT_CENTER] = "FRC",
     39     [REAR_CENTER] = "RC",
     40     [REAR_LEFT] = "RL", [REAR_RIGHT] = "RR",
     41     [REAR_LEFT_CENTER] = "RLC", [REAR_RIGHT_CENTER] = "RRC",
     42     [SIDE_FRONT_LEFT] = "SFL", [SIDE_FRONT_RIGHT] = "SFR",
     43     [SIDE_BACK_LEFT] = "SBL", [SIDE_BACK_RIGHT] = "SBR",
     44   };
     45 }
     46 
     47 #endif