~ubuntu-branches/ubuntu/quantal/gecko-mediaplayer/quantal

« back to all changes in this revision

Viewing changes to src/libgmlib/gm_audio.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2011-07-17 22:24:37 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20110717222437-f0skmzay316o4rve
Tags: 1.0.4-0ubuntu1
* New upstream release.
* debian/patches:
 - 90_svn420_fix_null.patch: Remove, merged upstream.
 - 91_svn421_disable_npp_initialize.patch: Remove, merged upstream.
 - dont_use_libxul.patch: Remove, fixed upstream.
 - autotools.patch: Remove, not needed now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 
2
/*
 
3
 * gm_audio.h
 
4
 * Copyright (C) Kevin DeKorte 2006 <kdekorte@gmail.com>
 
5
 * 
 
6
 * gm_audio.h is free software.
 
7
 * 
 
8
 * You may redistribute it and/or modify it under the terms of the
 
9
 * GNU General Public License, as published by the Free Software
 
10
 * Foundation; either version 2 of the License, or (at your option)
 
11
 * any later version.
 
12
 * 
 
13
 * gm_audio.h is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
16
 * See the GNU General Public License for more details.
 
17
 * 
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with playlist.c.  If not, write to:
 
20
 *      The Free Software Foundation, Inc.,
 
21
 *      51 Franklin Street, Fifth Floor
 
22
 *      Boston, MA  02110-1301, USA.
 
23
 */
 
24
 
 
25
#ifdef HAVE_CONFIG_H
 
26
#include <config.h>
 
27
#endif
 
28
 
 
29
#include <glib.h>
 
30
#include <glib/gi18n.h>
 
31
 
 
32
#ifndef __GM_AUDIO_H__
 
33
#define __GM_AUDIO_H__
 
34
 
 
35
typedef enum {
 
36
    AUDIO_TYPE_UNKNOWN,
 
37
    AUDIO_TYPE_SOFTVOL,         // use mplayer software volume control for non-alsa and non-pulse devices
 
38
    AUDIO_TYPE_ALSA,
 
39
    AUDIO_TYPE_PULSE
 
40
} GmAudioType;
 
41
 
 
42
typedef struct _AudioDevice {
 
43
    gchar *description;         // use this as a key to look up the information 
 
44
    GmAudioType type;
 
45
    gint alsa_card;
 
46
    gint alsa_device;
 
47
    gchar *alsa_device_name;
 
48
    gchar *alsa_mixer;          // this is not looked up
 
49
    gint pulse_index;
 
50
    gint pulse_channels;
 
51
    gdouble volume;
 
52
    gboolean muted;
 
53
    gchar *mplayer_ao;
 
54
} AudioDevice;
 
55
 
 
56
 
 
57
#ifdef __cplusplus
 
58
extern "C" {
 
59
#endif
 
60
 
 
61
    // prototypes go here
 
62
    gboolean gm_audio_query_devices();
 
63
    gboolean gm_audio_free();
 
64
    gboolean gm_audio_update_device(AudioDevice * device);
 
65
    gdouble gm_audio_get_volume(AudioDevice * device);
 
66
    gboolean gm_audio_set_volume(AudioDevice * device, gdouble volume);
 
67
    void gm_audio_set_server_volume_update_callback(AudioDevice * device, void *callback);
 
68
 
 
69
#ifdef __cplusplus
 
70
}
 
71
#endif
 
72
#endif