|
|
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:
9: extern char *sndptr, *sndptrmax;
10: extern int sndbuf, currbuf;
11: extern char *lpData;
12: extern int samplecount;
13:
14: static __inline__ void check_sound_buffers (void)
15: {
16: }
17:
18: #if 0
19: #define PUT_SOUND_BYTE(b) \
20: if (sndptr == sndptrmax) { \
21: if (++currbuf >= NUMSNDBUFS) currbuf -= NUMSNDBUFS; \
22: sndptr = wavehdr[currbuf].lpData; \
23: sndptrmax = sndptr+sndbufsize; \
24: } \
25: *sndptr++ = b; \
26: bytesinbuf++;
27:
28:
29: #define PUT_SOUND_WORD(b) \
30: if (sndptr == sndptrmax) { \
31: if (++currbuf >= NUMSNDBUFS) currbuf -= NUMSNDBUFS; \
32: sndptr = wavehdr[currbuf].lpData; \
33: sndptrmax = sndptr+sndbufsize; \
34: } \
35: *(short *)sndptr = b; \
36: sndptr += 2; \
37: bytesinbuf += 2;
38: #endif
39:
40: #define PUT_SOUND_BYTE(b) \
41: if (sndptr == sndptrmax) { \
42: sndptr = lpData; \
43: } \
44: samplecount++; \
45: *sndptr++ = b;
46:
47:
48: #define PUT_SOUND_WORD(b) \
49: if (sndptr == sndptrmax) { \
50: sndptr = lpData; \
51: } \
52: *(short *)sndptr = b; \
53: samplecount++; \
54: sndptr += 2;
55:
56: #define PUT_SOUND_BYTE_RIGHT(b) PUT_SOUND_BYTE(b)
57: #define PUT_SOUND_BYTE_LEFT(b) PUT_SOUND_BYTE(b)
58: #define PUT_SOUND_WORD_RIGHT(b) PUT_SOUND_WORD(b)
59: #define PUT_SOUND_WORD_LEFT(b) PUT_SOUND_WORD(b)
60:
61: #define SOUND16_BASE_VAL 0
62: #define SOUND8_BASE_VAL 128
63:
64: #define DEFAULT_SOUND_MINB 1500
65: #define DEFAULT_SOUND_MAXB 1500
66: #define DEFAULT_SOUND_BITS 8
67: #define DEFAULT_SOUND_FREQ 22050
68:
69: #define HAVE_STEREO_SUPPORT
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.