source: roaraudio/plugins/gstreamer0.10/roarmixer.c @ 2071:a6d6ac4af4ea

Last change on this file since 2071:a6d6ac4af4ea was 2071:a6d6ac4af4ea, checked in by phi, 15 years ago

start doing some basic operations

File size: 3.0 KB
Line 
1//roarmixer.c:
2/* GStreamer
3 * Copyright (C) <2005> Arwed v. Merkatz <v.merkatz@gmx.net>
4 * Copyright (C) <2008> Philipp 'ph3-der-loewe' Schafft
5 * Copyright (C) <2009> Philipp 'ph3-der-loewe' Schafft
6 *                            <lion@lion.leolix.org>
7 *
8 * roarmixer.h: an RoarAudio audio mixer
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Library General Public License for more details.
19 *
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library; if not, write to the
22 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 * Boston, MA 02111-1307, USA.
24 */
25
26
27#include "roarmixer.h"
28
29GstRoarMixer*    gst_roarmixer_new                (const gchar *device,
30                                                 GstRoarMixerDirection dir) {
31  GstRoarMixer *ret = NULL;
32
33  g_return_val_if_fail(device != NULL, NULL);
34
35  ret = g_new0(GstRoarMixer, 1);
36
37  ret->device = g_strdup(device);
38  ret->dir    = dir;
39
40/*
41  if (!gst_ossmixer_open (ret))
42    goto error;
43*/
44
45  if ( roar_simple_connect(&(ret->con), NULL, "gstroarmixer") == -1 )
46   goto error;
47
48  return ret;
49
50error:
51  if (ret)
52    gst_roarmixer_free (ret);
53
54  return NULL;
55}
56
57void            gst_roarmixer_free               (GstRoarMixer *mixer) {
58  g_return_if_fail(mixer != NULL);
59
60  if (mixer->device) {
61    g_free(mixer->device);
62    mixer->device = NULL;
63  }
64
65  if (mixer->cardname) {
66    g_free(mixer->cardname);
67    mixer->cardname = NULL;
68  }
69
70  if (mixer->tracklist) {
71    g_list_foreach(mixer->tracklist, (GFunc) g_object_unref, NULL);
72    g_list_free(mixer->tracklist);
73    mixer->tracklist = NULL;
74  }
75
76  roar_disconnect(&(mixer->con));
77
78  g_free (mixer);
79}
80
81const GList*    gst_roarmixer_list_tracks        (GstRoarMixer * mixer) {
82 return (const GList *) mixer->tracklist;
83}
84
85void            gst_roarmixer_set_volume         (GstRoarMixer * mixer,
86                                                 GstMixerTrack * track,
87                                                 gint * volumes) {
88}
89void            gst_roarmixer_get_volume         (GstRoarMixer * mixer,
90                                                 GstMixerTrack * track,
91                                                 gint * volumes) {
92}
93void            gst_roarmixer_set_record         (GstRoarMixer * mixer,
94                                                 GstMixerTrack * track,
95                                                 gboolean record) {
96}
97void            gst_roarmixer_set_mute           (GstRoarMixer * mixer,
98                                                 GstMixerTrack * track,
99                                                 gboolean mute) {
100}
101
102//ll
Note: See TracBrowser for help on using the repository browser.