-int mixer_channel(const char *c);
-/* convert @c@ to a channel number, or return -1 if it does not match */
+/** @brief Definition of a mixer */
+struct mixer {
+ /** @brief API used by this mixer */
+ int api;
+
+ /** @brief Get the volume
+ * @param left Where to store left-channel volume
+ * @param right Where to store right-channel volume
+ * @return 0 on success, non-0 on error
+ */
+ int (*get)(int *left, int *right);
+
+ /** @brief Set the volume
+ * @param left Pointer to target left-channel volume
+ * @param right Pointer to target right-channel volume
+ * @return 0 on success, non-0 on error
+ *
+ * @p left and @p right are updated with the actual volume set.
+ */
+ int (*set)(int *left, int *right);
+
+ /** @brief Default device */
+ const char *device;
+
+ /** @brief Default channel */
+ const char *channel;
+};