|
|
1.1 root 1: /*
2: * UAE - The Un*x Amiga Emulator
3: *
4: * Support for the Mute sound system.
5: *
6: * Copyright 1997 Bernd Schmidt
7: */
8:
1.1.1.2 ! root 9: extern char *sndptr, *sndptrmax, *sndptrhalfway;
1.1 root 10: extern int sndbuf, currbuf;
11: extern char *lpData;
1.1.1.2 ! root 12: extern unsigned int samplecount;
! 13:
! 14: extern void flush_sound_buffer( void );
1.1 root 15:
16: static __inline__ void check_sound_buffers (void)
17: {
1.1.1.2 ! root 18: if( sndptr == sndptrmax )
! 19: flush_sound_buffer();
1.1 root 20: }
21:
22: #define PUT_SOUND_BYTE(b) \
23: if (sndptr == sndptrmax) { \
24: sndptr = lpData; \
25: } \
26: samplecount++; \
27: *sndptr++ = b;
28:
29:
30: #define PUT_SOUND_WORD(b) \
31: if (sndptr == sndptrmax) { \
32: sndptr = lpData; \
33: } \
34: *(short *)sndptr = b; \
35: samplecount++; \
36: sndptr += 2;
37:
38: #define PUT_SOUND_BYTE_RIGHT(b) PUT_SOUND_BYTE(b)
39: #define PUT_SOUND_BYTE_LEFT(b) PUT_SOUND_BYTE(b)
40: #define PUT_SOUND_WORD_RIGHT(b) PUT_SOUND_WORD(b)
41: #define PUT_SOUND_WORD_LEFT(b) PUT_SOUND_WORD(b)
42:
43: #define SOUND16_BASE_VAL 0
44: #define SOUND8_BASE_VAL 128
45:
46: #define DEFAULT_SOUND_MINB 1500
47: #define DEFAULT_SOUND_MAXB 1500
48: #define DEFAULT_SOUND_BITS 8
49: #define DEFAULT_SOUND_FREQ 22050
50:
51: #define HAVE_STEREO_SUPPORT
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.