]> git.tuebingen.mpg.de Git - paraslash.git/commit
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)
commit46af7dd81149caee0409535d5d9884ed9fa5af0e
treecf8fb60569022409f5eb4412a9dd0ad5f44c04b3
parent7024574d05fe8571c763d11c61626a9ac4980267
fade: Switch to modular mixer API.

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.
error.h
fade.c
m4/gengetopt/fade.m4
mix.h [new file with mode: 0644]
oss_mix.c