JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
ChannelMap.h File Reference
#include "Core.h"
#include "ErrorReporting.h"
#include <bit>
#include <string_view>

Go to the source code of this file.

Classes

class  JPL::ChannelMap
 
struct  JPL::NamedChannelMask
 Utility to hold some channel mask with a name. More...
 
struct  std::hash< JPL::ChannelMap >
 

Namespaces

namespace  JPL
 
namespace  JPL::ChannelMask
 Common channel masks.
 
namespace  std
 

Enumerations

enum  JPL::EChannel : uint32 {
  JPL::FrontLeft = JPL_BIT(0) , JPL::FrontRight = JPL_BIT(1) , JPL::FrontCenter = JPL_BIT(2) , JPL::LFE = JPL_BIT(3) ,
  JPL::SideLeft = JPL_BIT(4) , JPL::SideRight = JPL_BIT(5) , JPL::FrontLeftCenter = JPL_BIT(6) , JPL::FrontRightCenter = JPL_BIT(7) ,
  JPL::BackLeft = JPL_BIT(8) , JPL::BackRight = JPL_BIT(9) , JPL::BackCenter = JPL_BIT(10) , JPL::WideLeft = JPL_BIT(11) ,
  JPL::WideRight = JPL_BIT(12) , JPL::TopCenter = JPL_BIT(13) , JPL::TopFrontLeft = JPL_BIT(14) , JPL::TopFrontCenter = JPL_BIT(15) ,
  JPL::TopFrontRight = JPL_BIT(16) , JPL::TopSideLeft = JPL_BIT(17) , JPL::TopSideRight = JPL_BIT(18) , JPL::TopBackLeft = JPL_BIT(19) ,
  JPL::TopBackCenter = JPL_BIT(20) , JPL::TopBackRight = JPL_BIT(21) , JPL::NUM_GroundChannels = std::bit_width((uint32)WideRight) , JPL::TOP_Channels = TopCenter ,
  JPL::NUM_TopChannels = std::bit_width((uint32)TopBackRight) - NUM_GroundChannels , JPL::Invalid = 0
}
 

Functions

constexpr std::string_view JPL::ToString (EChannel channel)
 
constexpr std::string_view JPL::ToStringShort (EChannel channel)
 
JPL_INLINE std::string_view JPL::ChannelMask::ToString (uint32 channelMask)
 

Variables

constexpr uint32 JPL::ChannelMask::Invalid = uint32(0)
 
constexpr uint32 JPL::ChannelMask::Mono = FrontCenter
 
constexpr uint32 JPL::ChannelMask::Stereo = FrontLeft | FrontRight
 
constexpr uint32 JPL::ChannelMask::LCR = FrontLeft | FrontRight | FrontCenter
 
constexpr uint32 JPL::ChannelMask::LRS = FrontLeft | FrontRight | BackCenter
 
constexpr uint32 JPL::ChannelMask::LCRS = FrontLeft | FrontRight | FrontCenter | BackCenter
 
constexpr uint32 JPL::ChannelMask::Quad = FrontLeft | FrontRight | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Pentagonal = FrontLeft | FrontRight | FrontCenter | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Octagonal = FrontLeft | FrontRight | FrontCenter | BackLeft | BackRight | BackCenter | WideLeft | WideRight
 
constexpr uint32 JPL::ChannelMask::Surround_4_1 = FrontLeft | FrontRight | LFE | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Surround_5_0 = FrontLeft | FrontRight | FrontCenter | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Surround_5_1 = FrontLeft | FrontRight | FrontCenter | LFE | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Surround_6_0 = FrontLeft | FrontRight | FrontCenter | BackLeft | BackRight | BackCenter
 
constexpr uint32 JPL::ChannelMask::Surround_6_1 = FrontLeft | FrontRight | FrontCenter | LFE | BackLeft | BackRight | BackCenter
 
constexpr uint32 JPL::ChannelMask::Surround_7_0 = FrontLeft | FrontRight | FrontCenter | SideLeft | SideRight | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_1 = FrontLeft | FrontRight | FrontCenter | LFE | SideLeft | SideRight | BackLeft | BackRight
 
constexpr uint32 JPL::ChannelMask::Surround_5_0_2 = FrontLeft | FrontRight | FrontCenter | BackLeft | BackRight | TopSideLeft | TopSideRight
 
constexpr uint32 JPL::ChannelMask::Surround_5_1_2 = FrontLeft | FrontRight | FrontCenter | LFE | BackLeft | BackRight | TopSideLeft | TopSideRight
 
constexpr uint32 JPL::ChannelMask::Surround_5_0_4 = FrontLeft | FrontRight | FrontCenter | BackLeft | BackRight | TopFrontLeft | TopFrontRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_5_1_4 = FrontLeft | FrontRight | FrontCenter | LFE | BackLeft | BackRight | TopFrontLeft | TopFrontRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_0_2 = FrontLeft | FrontRight | FrontCenter | SideLeft | SideRight | BackLeft | BackRight | TopSideLeft | TopSideRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_1_2 = FrontLeft | FrontRight | FrontCenter | LFE | SideLeft | SideRight | BackLeft | BackRight | TopSideLeft | TopSideRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_0_4 = FrontLeft | FrontRight | FrontCenter | SideLeft | SideRight | BackLeft | BackRight | TopFrontLeft | TopFrontRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_1_4 = FrontLeft | FrontRight | FrontCenter | LFE | SideLeft | SideRight | BackLeft | BackRight | TopFrontLeft | TopFrontRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_0_6 = FrontLeft | FrontRight | FrontCenter | SideLeft | SideRight | BackLeft | BackRight | TopFrontLeft | TopFrontRight | TopSideLeft | TopSideRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_7_1_6 = FrontLeft | FrontRight | FrontCenter | LFE | SideLeft | SideRight | BackLeft | BackRight | TopFrontLeft | TopFrontRight | TopSideLeft | TopSideRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_9_0_4 = FrontLeft | FrontRight | FrontCenter | SideLeft | SideRight | BackLeft | BackRight | WideLeft | WideRight | TopFrontLeft | TopFrontRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_9_1_4 = FrontLeft | FrontRight | FrontCenter | LFE | SideLeft | SideRight | BackLeft | BackRight | WideLeft | WideRight | TopFrontLeft | TopFrontRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_9_0_6 = FrontLeft | FrontRight | FrontCenter | SideLeft | SideRight | BackLeft | BackRight | WideLeft | WideRight | TopFrontLeft | TopFrontRight | TopSideLeft | TopSideRight | TopBackLeft | TopBackRight
 
constexpr uint32 JPL::ChannelMask::Surround_9_1_6 = FrontLeft | FrontRight | FrontCenter | LFE | SideLeft | SideRight | BackLeft | BackRight | WideLeft | WideRight | TopFrontLeft | TopFrontRight | TopSideLeft | TopSideRight | TopBackLeft | TopBackRight