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-07-21 04:00:58 +00:00
|
|
|
/* S1, S2, S3, S4 */
|
|
|
|
int on, len, skip, cont;
|
|
|
|
unsigned int pos;
|
|
|
|
|
|
|
|
/* S1, S2, S4 */
|
|
|
|
int enlen, envol, endir, enlenreload;
|
|
|
|
|
|
|
|
/* S1, S2 */
|
|
|
|
const byte *wave;
|
|
|
|
|
|
|
|
/* S1 only */
|
|
|
|
int swlen, swlenreload, swsteps, swstep, swdir;
|
|
|
|
|
|
|
|
/* S3 only */
|
|
|
|
int outputlevel;
|
|
|
|
|
|
|
|
/* S4 only */
|
|
|
|
int shiftskip, shiftpos, shiftright, shiftleft;
|
|
|
|
int nsteps, clock;
|
|
|
|
|
2005-03-02 23:49:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct snd
|
|
|
|
{
|
2007-07-21 04:00:58 +00:00
|
|
|
int level1, level2, balance;
|
|
|
|
bool gbDigitalSound;
|
2007-02-06 21:41:08 +00:00
|
|
|
int rate;
|
2007-07-21 04:00:58 +00:00
|
|
|
int quality;
|
2007-02-06 21:41:08 +00:00
|
|
|
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;
|
2007-07-21 04:00:58 +00:00
|
|
|
void sound_dirty(void);
|
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
|
|
|
|
|
|
|
#endif
|