X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mix.h;h=5d68b2bb0b34df798e38efad7b0ceeff687982fc;hp=fe85d74622b03a25f2f527118777c646075936db;hb=e413873ec15efc84366e747d3c5d48293b959c1f;hpb=bd374f0948c77dd91287f73f7573bf59f3fb5666 diff --git a/mix.h b/mix.h index fe85d746..5d68b2bb 100644 --- a/mix.h +++ b/mix.h @@ -16,10 +16,14 @@ struct mixer_handle; /** * Operations provided by each mixer plugin. + * + * Each mixer plugin must define a non-static instance of this structure, with + * all pointers initialized to non-NULL values. No other symbols need to be + * exported. */ struct mixer { - /** Called on startup, must fill in all other members. */ - void (*init)(struct mixer *self); + /** Used to identify the mixer. */ + const char * const name; /** Return a handle that can be passed to other methods. */ int (*open)(const char *dev, struct mixer_handle **handle); /** Returns a string of all valid mixer channels. */ @@ -34,3 +38,6 @@ struct mixer { /** Free all resources associated with the given handle. */ void (*close)(struct mixer_handle **handle); }; + +/** Declared even if unsupported because it does not hurt and avoids ifdefs. */ +extern const struct mixer alsa_mixer, oss_mixer;