paraslash 0.7.3
[paraslash.git] / oss_mix.c
index 8e87452b816e68f03f0931e79efe007d7491b6c8..0814336fdc20fcebce15f344910c658726be831c 100644 (file)
--- a/oss_mix.c
+++ b/oss_mix.c
@@ -1,8 +1,4 @@
-/*
- * Copyright (C) 1998 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 1998 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file oss_mix.c The OSS mixer plugin. */
 
@@ -60,7 +56,7 @@ static int oss_mix_open(const char *dev, struct mixer_handle **handle)
                PARA_ERROR_LOG("could not open %s\n", dev);
                return ret;
        }
-       h = para_malloc(sizeof(*h));
+       h = alloc(sizeof(*h));
        h->fd = ret;
        *handle = h;
        return 1;
@@ -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
+};