DEADSOFTWARE

headers describes that c-files implements
[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 // заголовок инструмента (DMI)
31 #pragma pack(1)
32 typedef struct {
33 unsigned int len; // длина в байтах
34 unsigned int rate; // частота в Гц.
35 unsigned int lstart; // начало повтора в байтах от начала данных
36 unsigned int llen; // длина повтора в байтах
37 } snd_t;
38 #pragma pack()
40 // громкость звука и музыки (0-128)
41 extern short snd_vol;
43 void S_init (void);
44 void S_done (void);
46 // проиграть звук s на канале c (1-8), частоте r и громкости v (0-255)
47 // возвращает номер канала, на котором играется звук
48 // если c==0, то звук попадет в любой свободный канал
49 // r - это относительная частота (обычно 1024)
50 short S_play (snd_t *s, short c, unsigned r, short v);
52 // остановить звук на канале c (1-8)
53 void S_stop (short c);
55 void S_volume (int v);
56 void free_chunks (void);
57 void S_wait (void);
59 #endif /* SOUND_H_INCLUDED */