+static speakerlayout_t snd_speakerlayout;
+
+// Our speaker layouts are based on ALSA. They differ from those
+// Win32 and Mac OS X APIs use when there's more than 4 channels.
+// (rear left + rear right, and front center + LFE are swapped).
+#define SND_SPEAKERLAYOUTS (sizeof(snd_speakerlayouts) / sizeof(snd_speakerlayouts[0]))
+static const speakerlayout_t snd_speakerlayouts[] =
+{
+ {
+ "surround71", 8,
+ {
+ {45, 0.2, 0.2, 0.5}, // front left
+ {315, 0.2, 0.2, 0.5}, // front right
+ {135, 0.2, 0.2, 0.5}, // rear left
+ {225, 0.2, 0.2, 0.5}, // rear right
+ {0, 0.2, 0.2, 0.5}, // front center
+ {0, 0, 0, 0}, // lfe (we don't have any good lfe sound sources and it would take some filtering work to generate them (and they'd probably still be wrong), so... no lfe)
+ {90, 0.2, 0.2, 0.5}, // side left
+ {180, 0.2, 0.2, 0.5}, // side right
+ }
+ },
+ {
+ "surround51", 6,
+ {
+ {45, 0.2, 0.2, 0.5}, // front left
+ {315, 0.2, 0.2, 0.5}, // front right
+ {135, 0.2, 0.2, 0.5}, // rear left
+ {225, 0.2, 0.2, 0.5}, // rear right
+ {0, 0.2, 0.2, 0.5}, // front center
+ {0, 0, 0, 0}, // lfe (we don't have any good lfe sound sources and it would take some filtering work to generate them (and they'd probably still be wrong), so... no lfe)
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ }
+ },
+ {
+ // these systems sometimes have a subwoofer as well, but it has no
+ // channel of its own
+ "surround40", 4,
+ {
+ {45, 0.3, 0.3, 0.8}, // front left
+ {315, 0.3, 0.3, 0.8}, // front right
+ {135, 0.3, 0.3, 0.8}, // rear left
+ {225, 0.3, 0.3, 0.8}, // rear right
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ }
+ },
+ {
+ // these systems sometimes have a subwoofer as well, but it has no
+ // channel of its own
+ "stereo", 2,
+ {
+ {90, 0.5, 0.5, 1}, // side left
+ {270, 0.5, 0.5, 1}, // side right
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ }
+ },
+ {
+ "mono", 1,
+ {
+ {0, 0, 1, 1}, // center
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ }
+ }
+};