2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
16 * Include file for sound hardware.
36 typedef SAMPLE digi_sound;
38 typedef struct digi_sound {
44 #define SAMPLE_RATE_11K 11025
45 #define SAMPLE_RATE_22K 22050
50 extern int digi_driver_board;
51 extern cvar_t digi_driver_port;
52 extern cvar_t digi_driver_irq;
53 extern int digi_driver_dma;
54 extern int digi_midi_type;
55 extern cvar_t digi_midi_port;
58 extern int digi_sample_rate;
60 extern int digi_get_settings(void);
61 extern int digi_init(void);
62 extern void digi_reset(void);
63 extern void digi_close(void);
65 // Volume is max at F1_0.
66 extern void digi_play_sample( int sndnum, fix max_volume );
67 extern void digi_play_sample_once( int sndnum, fix max_volume );
68 extern int digi_link_sound_to_object( int soundnum, short objnum, int forever, fix max_volume );
69 extern int digi_link_sound_to_pos( int soundnum, short segnum, short sidenum, vms_vector * pos, int forever, fix max_volume );
70 // Same as above, but you pass the max distance sound can be heard. The old way uses f1_0*256 for max_distance.
71 extern int digi_link_sound_to_object2( int soundnum, short objnum, int forever, fix max_volume, fix max_distance );
72 extern int digi_link_sound_to_pos2( int soundnum, short segnum, short sidenum, vms_vector * pos, int forever, fix max_volume, fix max_distance );
74 extern int digi_link_sound_to_object3( int org_soundnum, short objnum, int forever, fix max_volume, fix max_distance, int loop_start, int loop_end );
76 extern void digi_play_midi_song( char * filename, char * melodic_bank, char * drum_bank, int loop );
78 extern void digi_play_sample_3d( int soundno, int angle, int volume, int no_dups ); // Volume from 0-0x7fff
80 extern void digi_init_sounds(void);
81 extern void digi_sync_sounds(void);
82 extern void digi_kill_sound_linked_to_segment( int segnum, int sidenum, int soundnum );
83 extern void digi_kill_sound_linked_to_object( int objnum );
85 extern void digi_set_midi_volume( int mvolume );
86 extern void digi_set_digi_volume( int dvolume );
87 extern void digi_set_volume( int dvolume, int mvolume );
89 extern int digi_is_sound_playing(int soundno);
91 extern void digi_pause_all(void);
92 extern void digi_resume_all(void);
93 extern void digi_pause_digi_sounds(void);
94 extern void digi_resume_digi_sounds(void);
95 extern void digi_stop_all(void);
97 extern void digi_set_max_channels(int n);
98 extern int digi_get_max_channels(void);
100 extern int digi_lomem;
102 extern int digi_xlat_sound(int soundno);
104 extern void digi_stop_sound( int channel );
106 // Returns the channel a sound number is playing on, or
108 extern int digi_find_channel(int soundno);
111 extern int digi_start_sound(short soundnum, fix volume, int pan, int looping, int loop_start, int loop_end, int soundobj);
113 // Stops all sounds that are playing
114 void digi_stop_all_channels(void);
116 extern void digi_end_sound( int channel );
117 extern void digi_set_channel_pan( int channel, int pan );
118 extern void digi_set_channel_volume( int channel, int volume );
119 extern int digi_is_channel_playing(int channel);
120 extern void digi_pause_midi(void);
121 extern void digi_debug(void);
122 extern void digi_stop_current_song(void);
124 extern void digi_play_sample_looping( int soundno, fix max_volume,int loop_start, int loop_end );
125 extern void digi_change_looping_volume( fix volume );
126 extern void digi_stop_looping_sound(void);
128 // Plays a queued voice sound.
129 extern void digi_start_sound_queued( short soundnum, fix volume );