1
/* gcompris - gameutil.h
3
* Copyright (C) 2000 Bruno Coudoin
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.
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.
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/>.
23
#ifndef SOUNDUTIL_SDL_H
24
#define SOUNDUTIL_SDL_H
29
#define MAX_QUEUE_LENGTH 5
30
#define MAX_SOUND_FILES 20
32
int decode_ogg_file(char *infile);
33
void display_ao_devices();
39
void sdlplayer_close();
40
void sdlplayer_reopen();
42
int sdlplayer_music(char *filename, int volume);
43
void sdlplayer_halt_music();
44
void sdlplayer_pause_music();
45
void sdlplayer_resume_music();
47
void sdlplayer_halt_fx();
48
void sdlplayer_resume_fx();
49
int sdlplayer_fx(char *filename, int volume);
51
gchar *gc_sound_alphabet(gchar *chars);
54
/*************************************************************/
55
/* GObject to control sound. code get from maman-file.h */
56
/*************************************************************/
58
* Potentially, include other headers on which this header depends.
60
#include <glib-object.h>
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))
69
typedef struct _GcomprisSound GcomprisSound;
70
typedef struct _GcomprisSoundClass GcomprisSoundClass;
71
typedef struct _GcomprisSoundPrivate GcomprisSoundPrivate;
73
struct _GcomprisSound {
75
/* instance members */
76
GcomprisSoundPrivate *private;
79
struct _GcomprisSoundClass {
82
guint sound_played_signal_id;
83
void (*sound_played) (GcomprisSound *self, gchar *file, gpointer user_data);
86
/* used by MAMAN_TYPE_FILE */
87
GType gc_sound_get_type (void);
94
/* Declaration of GCompris Sound Controller */
95
extern GObject *gc_sound_controller;