2005-03-02 23:49:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __SOUND_H__
|
|
|
|
#define __SOUND_H__
|
|
|
|
|
2005-06-24 22:33:21 +00:00
|
|
|
#include "defs.h"
|
2005-03-02 23:49:38 +00:00
|
|
|
|
|
|
|
struct sndchan
|
|
|
|
{
|
|
|
|
int on;
|
|
|
|
unsigned pos;
|
|
|
|
int cnt, encnt, swcnt;
|
|
|
|
int len, enlen, swlen;
|
|
|
|
int swfreq;
|
|
|
|
int freq;
|
|
|
|
int envol, endir;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct snd
|
|
|
|
{
|
|
|
|
int rate;
|
|
|
|
struct sndchan ch[4];
|
|
|
|
byte wave[16];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern struct snd snd;
|
|
|
|
|
|
|
|
byte sound_read(byte r);
|
|
|
|
void sound_write(byte r, byte b);
|
|
|
|
void sound_dirty(void);
|
|
|
|
void sound_off(void);
|
|
|
|
void sound_reset(void);
|
|
|
|
void sound_mix(void);
|
|
|
|
void s1_init(void);
|
|
|
|
void s2_init(void);
|
|
|
|
void s3_init(void);
|
|
|
|
void s4_init(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|