1fde7067999addb79e2b2564b7e0f47a6243232a
[dos_sbtest] / src / audio.h
1 /*\r
2 pcboot - bootable PC demo/game kernel\r
3 Copyright (C) 2018  John Tsiombikas <nuclear@member.fsf.org>\r
4 \r
5 This program is free software: you can redistribute it and/or modify\r
6 it under the terms of the GNU General Public License as published by\r
7 the Free Software Foundation, either version 3 of the License, or\r
8 (at your option) any later version.\r
9 \r
10 This program is distributed in the hope that it will be useful,\r
11 but WITHOUT ANY WARRANTY, without even the implied warranty of\r
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 GNU General Public License for more details.\r
14 \r
15 You should have received a copy of the GNU General Public License\r
16 along with this program.  If not, see <https://www.gnu.org/licenses/>.\r
17 */\r
18 #ifndef AUDIO_H_\r
19 #define AUDIO_H_\r
20 \r
21 typedef int (*audio_callback_func)(void *buffer, int size, void *cls);\r
22 \r
23 void audio_init(void);\r
24 \r
25 void audio_set_callback(audio_callback_func func, void *cls);\r
26 int audio_callback(void *buf, int sz);\r
27 \r
28 void audio_play(int rate, int nchan);\r
29 void audio_pause(void);\r
30 void audio_resume(void);\r
31 void audio_stop(void);\r
32 int audio_isplaying(void);\r
33 \r
34 void audio_volume(int vol);\r
35 \r
36 #endif  /* AUDIO_H_ */\r