X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=oss_mix.c;h=f80301e9df282c13ef0e7d8ab2a025dd61624ba7;hp=5182ad238b81f706ebac2f6abdcaec3859b809dc;hb=79a88784e0819c1bbe9de8d39a0e05997c8211f6;hpb=9d75ded33ce6664156acb07e311f51d55970bbea diff --git a/oss_mix.c b/oss_mix.c index 5182ad23..f80301e9 100644 --- a/oss_mix.c +++ b/oss_mix.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 1998-2013 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 1998 Andre Noll , see file COPYING. */ /** \file oss_mix.c The OSS mixer plugin. */ @@ -98,7 +94,7 @@ static int oss_mix_set_channel(struct mixer_handle *handle, handle->id = i; return 1; } - return -E_OSS_MIXER_CHANNEL; + return -E_BAD_CHANNEL; } static int oss_mix_get(struct mixer_handle *handle) @@ -135,19 +131,13 @@ static void oss_mix_close(struct mixer_handle **handle) *handle = NULL; } -/** - * The init function of the OSS mixer. - * - * \param self The structure to initialize. - * - * \sa struct \ref mixer, \ref alsa_mix_init(). - */ -void oss_mix_init(struct mixer *self) -{ - self->open = oss_mix_open; - self->get_channels = oss_mix_get_channels; - self->set_channel = oss_mix_set_channel; - self->get = oss_mix_get; - self->set = oss_mix_set; - self->close = oss_mix_close; -} +/** The mixer operations for the OSS mixer. */ +const struct mixer oss_mixer = { + .name = "oss", + .open = oss_mix_open, + .get_channels = oss_mix_get_channels, + .set_channel = oss_mix_set_channel, + .close = oss_mix_close, + .get = oss_mix_get, + .set = oss_mix_set +};