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
|
|
|
|
{
|
2007-02-06 21:41:08 +00:00
|
|
|
int on;
|
|
|
|
unsigned pos;
|
|
|
|
int cnt, encnt, swcnt;
|
|
|
|
int len, enlen, swlen;
|
|
|
|
int freq;
|
|
|
|
int envol, endir;
|
2005-03-02 23:49:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct snd
|
|
|
|
{
|
2007-02-06 21:41:08 +00:00
|
|
|
int rate;
|
|
|
|
struct sndchan ch[4];
|
2005-03-02 23:49:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct snd snd;
|
|
|
|
|
2006-01-20 20:59:07 +00:00
|
|
|
#if defined(ICODE_ATTR) && defined(CPU_ARM)
|
|
|
|
#undef ICODE_ATTR
|
|
|
|
#define ICODE_ATTR
|
|
|
|
#endif
|
|
|
|
|
2006-01-20 13:05:52 +00:00
|
|
|
byte sound_read(byte r) ICODE_ATTR;
|
2006-06-19 01:47:45 +00:00
|
|
|
void sound_write(byte r, byte b) ICODE_ATTR;
|
|
|
|
void sound_dirty(void) ICODE_ATTR;
|
2005-03-02 23:49:38 +00:00
|
|
|
void sound_reset(void);
|
2006-06-19 01:47:45 +00:00
|
|
|
void sound_mix(void) ICODE_ATTR;
|
2005-03-02 23:49:38 +00:00
|
|
|
void s1_init(void);
|
|
|
|
void s2_init(void);
|
|
|
|
void s3_init(void);
|
|
|
|
void s4_init(void);
|
|
|
|
|
|
|
|
#endif
|