Stop sharing requirement_unit_state_ereq().
[freeciv.git] / client / audio_none.c
blob27ff35ea7a9eac5540d425c7b0c1bf288a316990
1 /**********************************************************************
2 Freeciv - Copyright (C) 2002 - R. Falke
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 ***********************************************************************/
14 #ifdef HAVE_CONFIG_H
15 #include <fc_config.h>
16 #endif
18 #include <string.h>
20 #include "support.h"
22 #include "audio.h"
23 #include "gui_main_g.h"
25 #include "audio_none.h"
27 /**************************************************************************
28 Clean up
29 **************************************************************************/
30 static void none_audio_shutdown(void)
34 /**************************************************************************
35 Stop music
36 **************************************************************************/
37 static void none_audio_stop(void)
41 /**************************************************************************
42 Wait
43 **************************************************************************/
44 static void none_audio_wait(void)
48 /**************************************************************************
49 Play sound sample
50 **************************************************************************/
51 static bool none_audio_play(const char *const tag, const char *const fullpath,
52 bool repeat, audio_finished_callback cb)
54 if (strcmp(tag, "e_turn_bell") == 0) {
55 sound_bell();
56 return TRUE;
58 return FALSE;
61 /**************************************************************************
62 Initialize.
63 **************************************************************************/
64 static bool none_audio_init(void)
66 return TRUE;
69 /**************************************************************************
70 Initialize.
71 **************************************************************************/
72 void audio_none_init(void)
74 struct audio_plugin self;
76 sz_strlcpy(self.name, "none");
77 sz_strlcpy(self.descr, "/dev/null plugin");
78 self.init = none_audio_init;
79 self.shutdown = none_audio_shutdown;
80 self.stop = none_audio_stop;
81 self.wait = none_audio_wait;
82 self.play = none_audio_play;
83 audio_add_plugin(&self);