blob: 364f95780f15f32fb97548de8476d2b0842f4133 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/* gcompris - gameutil.h
*
* Copyright (C) 2000 Bruno Coudoin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SOUNDUTIL_H
#define SOUNDUTIL_H
#include <stdio.h>
#include "gcompris.h"
#define MAX_QUEUE_LENGTH 5
typedef enum
{
PLAY_ONLY_IF_IDLE = 0,
PLAY_AFTER_CURRENT = 1,
PLAY_AND_INTERRUPT = 2,
} SoundPolicy;
typedef void (*GcomprisSoundCallback) (gchar *);
void gc_sound_init(void);
void gc_sound_play_ogg(const gchar *, ...);
void gc_sound_play_ogg_cb(const gchar *, GcomprisSoundCallback);
void gc_sound_play_ogg_list( GList* files );
void gc_sound_policy_set(int);
int gc_sound_policy_get(void);
void gc_sound_reopen(void);
void gc_sound_bg_reopen(void);
void gc_sound_fx_reopen(void);
void gc_sound_close(void);
void gc_sound_bg_close(void);
void gc_sound_fx_close(void);
void gc_sound_bg_pause(void);
void gc_sound_fx_pause(void);
void gc_sound_bg_resume(void);
void gc_sound_fx_resume(void);
gchar *gc_sound_alphabet(gchar *chars);
void fx_play ();
char *get_next_sound_to_play( );
gpointer bg_play (gpointer dummy);
char *gc_sound_get_next_music();
void gc_sound_build_music_list();
void gc_sound_callback(gchar *file);
#endif
|