MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / GetChannelMask

Function GetChannelMask

src/output/plugins/wasapi/WasapiOutputPlugin.cxx:49–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47static constexpr Domain wasapi_output_domain("wasapi_output");
48
49constexpr uint32_t
50GetChannelMask(const uint8_t channels) noexcept
51{
52 switch (channels) {
53 case 1:
54 return KSAUDIO_SPEAKER_MONO;
55 case 2:
56 return KSAUDIO_SPEAKER_STEREO;
57 case 3:
58 return SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER;
59 case 4:
60 return KSAUDIO_SPEAKER_QUAD;
61 case 5:
62 return SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER |
63 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
64 case 6:
65 return KSAUDIO_SPEAKER_5POINT1;
66 case 7:
67 return KSAUDIO_SPEAKER_5POINT1 | SPEAKER_BACK_CENTER;
68 case 8:
69 return KSAUDIO_SPEAKER_7POINT1_SURROUND;
70 default:
71 gcc_unreachable();
72 }
73}
74
75template <typename Functor>
76inline bool

Callers 1

GetFormatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected