/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/include/sys/sound.h
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/include/sys/sound.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1527 - (show annotations)
Sat Sep 7 09:16:40 2019 UTC (12 days, 5 hours ago) by dbug
File MIME type: text/plain
File size: 2292 byte(s)
OSDK 1.15

1 /* sys/sound.h */
2
3 #ifndef _SYS_SOUND_
4
5 #define _SYS_SOUND_
6
7
8 /* The PING (bell) sound. */
9
10 extern void ping(void);
11
12
13 /* Gunshot sound. */
14
15 extern void shoot(void);
16
17
18 /* Zap sound. */
19
20 extern void zap(void);
21
22
23 /* Explosion sound. */
24
25 extern void explode(void);
26
27
28 /* Keyclick #1, normal keys. */
29
30 extern void kbdclick1(void);
31
32
33 /* Keyclick #2, special keys. */
34
35 extern void kbdclick2(void);
36
37
38 /* The play command sets the state of the GI AY-3-8912 sound chip. */
39
40 /* Same as ROM BASIC PLAY command. You can use the following */
41 /* macros to address channel combinations and/or envelope */
42 /* patterns. */
43
44 #define PCHN_1 001
45 #define PCHN_2 002
46 #define PCHN_12 003
47 #define PCHN_3 004
48 #define PCHN_13 005
49 #define PCHN_23 006
50 #define PCHN_123 007
51
52 #define ENV_DECAY 001 /* \_________ envelope */
53 #define ENV_ATTACK_CUT 002 /* /_________ envelope */
54 #define ENV_SAW_DOWN 003 /* \\\\\\\\\\ envelope */
55 #define ENV_WAVE 004 /* /\/\/\/\/\ envelope */
56 #define ENV_DECAY_CONT 005 /* \~~~~~~~~~ envelope */
57 #define ENV_SAW_UP 006 /* ////////// envelope */
58 #define ENV_ATTACK_CONT 007 /* /~~~~~~~~~ envelope */
59
60 #define VOL_ENVELOPE 0x0
61 #define VOL_QUIETEST 0x1
62 #define VOL_LOUDEST 0xe
63
64 extern int play(int soundchanels,int noisechanels,int envelop,int volume);
65
66
67 /* Play a musical tone through the selected channel. */
68
69 #define CHAN_1 1
70 #define CHAN_2 2
71 #define CHAN_3 3
72
73 #define NOTE_C 1
74 #define NOTE_C_SHARP 2
75 #define NOTE_D 3
76 #define NOTE_D_SHARP 4
77 #define NOTE_E 5
78 #define NOTE_F 6
79 #define NOTE_F_SHARP 7
80 #define NOTE_G 8
81 #define NOTE_G_SHARP 9
82 #define NOTE_A 10
83 #define NOTE_A_SHARP 11
84 #define NOTE_B 12
85
86 #define NOTE_DO 1
87 #define NOTE_DO_DIESE 2
88 #define NOTE_RE 3
89 #define NOTE_RE_DIESE 4
90 #define NOTE_MI 5
91 #define NOTE_FA 6
92 #define NOTE_FA_DIESE 7
93 #define NOTE_SOL 8
94 #define NOTE_SOL_DIESE 9
95 #define NOTE_LA 10
96 #define NOTE_LA_DIESE 11
97 #define NOTE_SI 12
98
99 extern int music(int channel,int octave,int key,int volume);
100
101
102 /* Play a sound of given period (1/frequency) through the */
103 /* specified channel. */
104
105 extern int sound(int channel,int period,int volume);
106
107
108 #endif /* _SYS_SOUND_ */
109
110 /* end of file sys/sound.h */
111

  ViewVC Help
Powered by ViewVC 1.1.26