]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
fade: Switch to modular mixer API.
authorAndre Noll <maan@systemlinux.org>
Mon, 16 Jul 2012 19:29:19 +0000 (21:29 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 7 Oct 2012 09:12:07 +0000 (11:12 +0200)
Although only the oss mixer is supported ATM, this commit paves the way
for supporting more than one mixer API. It moves the oss-specific part
of para_fade to the new oss_mix.c file added by the previous commit.

Different mixer APIs will support different sets of mixer channels,
so handling of the various mixer channels is changed from a ggo enum
config option to a string option which allows to specify arbitrary
strings. The mixer implementations must check the given strings
themselves and are supposed to define a ->get_channels method which
returns the available channels. This function is called from fade.c
if an invalid channel is given.

The default mixer device, currently hardcoded in the ggo file to
"/dev/mixer", is fine for OSS. The ALSA mixer will need another default
however. Therefore this patch removes the default setting from the ggo
file so that the corresponding ggo config variable will be NULL if no
mixer device was given. The mixer implementations are supposed to check
this variable and fall back to their individual defaults if it is NULL.


No differences found