Remove the 4.0 Surround layout and make 4.0 the quad layout

This commit is contained in:
TheM14 committed 2026-10-29 00:52:17 +08:00
1 parent 7cd5c660e4
commit c8d2b09357
8 files changed
+71 -75

No files matched your search

+6 -6
View File
@@ -8,7 +8,7 @@
namespace joc::speaker {
inline constexpr int kLayoutCount = 12;
inline constexpr int kLayoutCount = 11;
struct LayoutInfo {
const char* name = "";
@@ -17,13 +17,13 @@ struct LayoutInfo {
std::uint32_t channel_count = 0;
};
// All twelve layouts in the reference's order (2.0, 3.1, 4.0 Surround, 4.0 Quad,
// 5.1, 7.1, 5.1.2, 5.1.4, 7.1.2, 7.1.4, 9.1.4, 9.1.6).
// All eleven layouts in the reference's order (2.0, 3.1, 4.0, 5.1, 7.1, 5.1.2,
// 5.1.4, 7.1.2, 7.1.4, 9.1.4, 9.1.6).
bool layout_at(int index, LayoutInfo* out);
// False when the name is unknown (case-sensitive, as the reference CLI). The
// legacy spelling "4.0" resolves to 4.0 Surround, which is what that name meant
// before the two 4.0 layouts were told apart.
// False when the name is unknown (case-sensitive, as the reference CLI). "4.0"
// is the quad layout (L R Lrs Rrs); a stored value is normalized by the caller
// before the name is looked up here.
bool layout_by_name(const char* name, LayoutInfo* out);
bool layout_by_bitfield(std::uint32_t bitfield, LayoutInfo* out);