Rework civ2civ3 ruleset help and documentation.
[freeciv.git] / client / audio.h
blobc76f9e051ee2ab867c908f3fdf201981ab73852a
1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__AUDIO_H
14 #define FC__AUDIO_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 #include "support.h" /* bool type */
22 #define MAX_AUDIO_NAME_LEN 20
23 #define MAX_AUDIO_DESCR_LEN 200
25 struct audio_plugin {
26 char name[MAX_AUDIO_NAME_LEN];
27 char descr[MAX_AUDIO_DESCR_LEN];
28 bool (*init) (void);
29 void (*shutdown) (void);
30 void (*stop) (void);
31 void (*wait) (void);
32 double (*get_volume) (void);
33 void (*set_volume) (double volume);
34 bool (*play) (const char *const tag, const char *const path, bool repeat);
37 struct strvec;
38 const struct strvec *get_soundplugin_list(void);
39 const struct strvec *get_soundset_list(void);
41 void audio_init(void);
42 void audio_real_init(const char *const spec_name,
43 const char *const prefered_plugin_name);
44 void audio_add_plugin(struct audio_plugin *p);
45 void audio_shutdown(void);
46 void audio_stop(void);
47 void audio_restart(const char *soundset_name);
49 void audio_play_sound(const char *const tag, char *const alt_tag);
50 void audio_play_music(const char *const tag, char *const alt_tag);
52 double audio_get_volume(void);
53 void audio_set_volume(double volume);
55 bool audio_select_plugin(const char *const name);
56 const char *audio_get_all_plugin_names(void);
58 #ifdef __cplusplus
60 #endif /* __cplusplus */
62 #endif /* FC__AUDIO_H */