sound.h
1 2 3 #ifndef __SOUND_H__ 4 #define __SOUND_H__ 5 6 7 struct sndchan 8 { 9 int on; 10 unsigned pos; 11 int cnt, encnt, swcnt; 12 int len, enlen, swlen; 13 int swfreq; 14 int freq; 15 int envol, endir; 16 }; 17 18 19 struct snd 20 { 21 int rate; 22 struct sndchan ch[4]; 23 byte wave[16]; 24 }; 25 26 27 extern struct snd snd; 28 29 30 extern void sound_reset(int rate); 31 extern void audio_play_sample(int16 *bufl, int16 *bufr, int length); 32 33 34 35 36 #endif 37 38