diff options
Diffstat (limited to 'src/gcompris/soundutil.h')
-rw-r--r-- | src/gcompris/soundutil.h | 79 |
1 files changed, 6 insertions, 73 deletions
diff --git a/src/gcompris/soundutil.h b/src/gcompris/soundutil.h index 13a5c89..4c75a8e 100644 --- a/src/gcompris/soundutil.h +++ b/src/gcompris/soundutil.h @@ -27,89 +27,22 @@ #define MAX_QUEUE_LENGTH 5 #define MAX_SOUND_FILES 20 -typedef enum -{ - PLAY_ONLY_IF_IDLE = 0, - PLAY_AFTER_CURRENT = 1, - PLAY_AND_INTERRUPT = 2, -} SoundPolicy; - -typedef void (*GcomprisSoundCallback) (gchar *); - -void gc_sound_play_ogg(const gchar *, ...); -void gc_sound_play_ogg_cb(const gchar *, GcomprisSoundCallback); +void gc_sound_play_ogg(const gchar *, ...); void gc_sound_play_ogg_list( GList* files ); -void gc_sound_policy_set(int); -int gc_sound_policy_get(void); + void gc_sound_init(void); void gc_sound_reopen(void); void gc_sound_close(void); void gc_sound_pause(void); void gc_sound_resume(void); -int decode_ogg_file(char *infile); -void display_ao_devices(); - -/* - * SDL PLAYER - */ -int sdlplayer_init(); -void sdlplayer_close(); -void sdlplayer_reopen(); +void gc_music_play(); -int sdlplayer_music(char *filename, int volume); -void sdlplayer_halt_music(); -void sdlplayer_pause_music(); -void sdlplayer_resume_music(); - -void sdlplayer_halt_fx(); -void sdlplayer_resume_fx(); -int sdlplayer_fx(char *filename, int volume); +GcSoundItem *gc_sound_item_from_gc_filename(gchar *filename, const gchar *first_arg_name, ...); gchar *gc_sound_alphabet(gchar *chars); - -/*************************************************************/ -/* GObject to control sound. code get from maman-file.h */ -/*************************************************************/ -/* - * Potentially, include other headers on which this header depends. - */ -#include <glib-object.h> - -#define GCOMPRIS_SOUND_TYPE (gc_sound_get_type ()) -#define GCOMPRIS_SOUND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCOMPRIS_SOUND_TYPE, GcomprisSound)) -#define GCOMPRIS_SOUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCOMPRIS_SOUND_TYPE, GcomprisSoundClass)) -#define GCOMPRIS_SOUND_IS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCOMPRIS_SOUND_TYPE)) -#define GCOMPRIS_SOUND_IS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCOMPRIS_SOUND_TYPE)) -#define GCOMPRIS_SOUND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCOMPRIS_SOUND_TYPE, GcomprisSoundClass)) - -typedef struct _GcomprisSound GcomprisSound; -typedef struct _GcomprisSoundClass GcomprisSoundClass; -typedef struct _GcomprisSoundPrivate GcomprisSoundPrivate; - -struct _GcomprisSound { - GObject parent; - /* instance members */ - GcomprisSoundPrivate *private; -}; - -struct _GcomprisSoundClass { - GObjectClass parent; - - guint sound_played_signal_id; - void (*sound_played) (GcomprisSound *self, gchar *file, gpointer user_data); -}; - -/* used by MAMAN_TYPE_FILE */ -GType gc_sound_get_type (void); - -/* API. */ - -/* empty for now */ - - -/* Declaration of GCompris Sound Controller */ -extern GObject *gc_sound_controller; +void gc_sound_policy_set(GcSoundPolicy policy); +GcSoundPolicy gc_sound_policy_get(void); #endif |