~ubuntu-branches/ubuntu/maverick/gcompris/maverick

« back to all changes in this revision

Viewing changes to src/gcompris/soundutil_sdl.h

  • Committer: Bazaar Package Importer
  • Author(s): Marc Gariepy, Marc Gariepy, Stephane Graber
  • Date: 2010-01-04 17:42:49 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20100104174249-7bupatd9dtxyhvs4
Tags: 9.0-0ubuntu1
[Marc Gariepy]
* New upstream release (9.0).
* Remove cache.c from POTFILES to avoid FTBFS
* Remove unneeded rm in debian/rules (file no longer exists upstream)

[Stephane Graber]
* Bump Debian standards to 3.8.3
* Add patch system (dpatch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* gcompris - gameutil.h
 
2
 *
 
3
 * Copyright (C) 2000 Bruno Coudoin
 
4
 *
 
5
 *   This program is free software; you can redistribute it and/or modify
 
6
 *   it under the terms of the GNU General Public License as published by
 
7
 *   the Free Software Foundation; either version 3 of the License, or
 
8
 *   (at your option) any later version.
 
9
 *
 
10
 *   This program is distributed in the hope that it will be useful,
 
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *   GNU General Public License for more details.
 
14
 *
 
15
 *   You should have received a copy of the GNU General Public License
 
16
 *   along with this program; if not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#include <config.h>
 
20
 
 
21
#ifdef USE_SDLMIXER
 
22
 
 
23
#ifndef SOUNDUTIL_SDL_H
 
24
#define SOUNDUTIL_SDL_H
 
25
 
 
26
#include <stdio.h>
 
27
#include "gcompris.h"
 
28
 
 
29
#define MAX_QUEUE_LENGTH 5
 
30
#define MAX_SOUND_FILES 20
 
31
 
 
32
int      decode_ogg_file(char *infile);
 
33
void     display_ao_devices();
 
34
 
 
35
/*
 
36
 * SDL PLAYER
 
37
 */
 
38
int      sdlplayer_init();
 
39
void     sdlplayer_close();
 
40
void     sdlplayer_reopen();
 
41
 
 
42
int      sdlplayer_music(char *filename, int volume);
 
43
void     sdlplayer_halt_music();
 
44
void     sdlplayer_pause_music();
 
45
void     sdlplayer_resume_music();
 
46
 
 
47
void     sdlplayer_halt_fx();
 
48
void     sdlplayer_resume_fx();
 
49
int      sdlplayer_fx(char *filename, int volume);
 
50
 
 
51
gchar *gc_sound_alphabet(gchar *chars);
 
52
 
 
53
 
 
54
/*************************************************************/
 
55
/* GObject to  control sound. code get from maman-file.h     */
 
56
/*************************************************************/
 
57
/*
 
58
 * Potentially, include other headers on which this header depends.
 
59
 */
 
60
#include <glib-object.h>
 
61
 
 
62
#define GCOMPRIS_SOUND_TYPE       (gc_sound_get_type ())
 
63
#define GCOMPRIS_SOUND(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCOMPRIS_SOUND_TYPE, GcomprisSound))
 
64
#define GCOMPRIS_SOUND_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GCOMPRIS_SOUND_TYPE, GcomprisSoundClass))
 
65
#define GCOMPRIS_SOUND_IS(obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj),  GCOMPRIS_SOUND_TYPE))
 
66
#define GCOMPRIS_SOUND_IS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCOMPRIS_SOUND_TYPE))
 
67
#define GCOMPRIS_SOUND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GCOMPRIS_SOUND_TYPE, GcomprisSoundClass))
 
68
 
 
69
typedef struct _GcomprisSound GcomprisSound;
 
70
typedef struct _GcomprisSoundClass GcomprisSoundClass;
 
71
typedef struct _GcomprisSoundPrivate GcomprisSoundPrivate;
 
72
 
 
73
struct _GcomprisSound {
 
74
        GObject parent;
 
75
        /* instance members */
 
76
        GcomprisSoundPrivate *private;
 
77
};
 
78
 
 
79
struct _GcomprisSoundClass {
 
80
        GObjectClass parent;
 
81
 
 
82
        guint sound_played_signal_id;
 
83
        void (*sound_played) (GcomprisSound *self, gchar *file, gpointer user_data);
 
84
};
 
85
 
 
86
/* used by MAMAN_TYPE_FILE */
 
87
GType gc_sound_get_type (void);
 
88
 
 
89
/* API. */
 
90
 
 
91
/* empty for now */
 
92
 
 
93
 
 
94
/* Declaration of GCompris Sound Controller */
 
95
extern GObject *gc_sound_controller;
 
96
 
 
97
#endif
 
98
 
 
99
#endif //