DEADSOFTWARE

81c7dca486257c37c983a8194bbc68d8710f22de
[flatwaifu.git] / src / sound.h
1 /*
2 Управление звуком и музыкой для DOS4GW
3 Версия 1.0
4 Copyright (C) Алексей Волынсков, 1996
6 Copyright (C) Prikol Software 1996-1997
7 Copyright (C) Aleksey Volynskov 1996-1997
8 Copyright (C) <ARembo@gmail.com> 2011
10 This file is part of the Doom2D:Rembo project.
12 Doom2D:Rembo is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License version 2 as
14 published by the Free Software Foundation.
16 Doom2D:Rembo is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, see <http://www.gnu.org/licenses/> or
23 write to the Free Software Foundation, Inc.,
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 */
27 #ifndef SOUND_H_INCLUDED
28 #define SOUND_H_INCLUDED
30 #include "menu.h"
31 #include "system.h"
33 typedef struct {
34 int tag;
35 } snd_t;
37 const cfg_t *S_args (void);
38 const cfg_t *S_conf (void);
39 const menu_t *S_menu (void);
41 // Get sound handle for resource <id>
42 snd_t *S_get (int id);
44 // Get sound handle for resource with name
45 snd_t *S_load (const char name[8]);
47 // Stop sound and free handle
48 void S_free (snd_t *s);
50 // Initialize sound subsystem
51 void S_init (void);
53 // Deinitialize sound subsystem
54 void S_done (void);
56 // Play sound <s> on channel <c> with volume <v>.
57 // <s> = sound handle (NULL is ignored)
58 // <c> = 1..8 or 0 for any free
59 // <v> = 0..255
60 // return used channel or zero on error
61 short S_play (snd_t *s, short c, short v);
63 // Stop sound on channel <c>
64 // <c> = 0..8 (0 ignored)
65 void S_stop (short c);
67 // Set sound volume to <v>, also affects variable snd_vol
68 // <v> = 0..128
69 void S_volume (int v);
71 // Wait before all sounds end playing
72 void S_wait (void);
74 #endif /* SOUND_H_INCLUDED */