| 47 | static constexpr Domain wasapi_output_domain("wasapi_output"); |
| 48 | |
| 49 | constexpr uint32_t |
| 50 | GetChannelMask(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 | |
| 75 | template <typename Functor> |
| 76 | inline bool |