00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef MSS_VERSION
00026
00027 #define MSS_VERSION "5.0a"
00028 #define MSS_VERSION_DATE "17-Sep-98"
00029
00030 #define MSS_COPYRIGHT "Copyright (C) 1991-98 RAD Game Tools, Inc."
00031
00032 #endif
00033
00034 #ifndef MSS_H
00035 #define MSS_H
00036
00037
00038
00039
00040
00041
00042
00043
00044 #ifdef IS_DOS
00045 #undef IS_DOS
00046 #endif
00047
00048 #ifdef IS_WINDOWS
00049 #undef IS_WINDOWS
00050 #endif
00051
00052 #ifdef IS_WIN32
00053 #undef IS_WIN32
00054 #endif
00055
00056 #ifdef IS_WIN16
00057 #undef IS_WIN16
00058 #endif
00059
00060 #ifdef IS_32
00061 #undef IS_32
00062 #endif
00063
00064 #ifdef IS_16
00065 #undef IS_16
00066 #endif
00067
00068 #ifdef __DOS__
00069 #define IS_DOS
00070 #define IS_32
00071 #else
00072 #ifdef _WIN32
00073 #define IS_WINDOWS
00074 #define IS_WIN32
00075 #define IS_32
00076 #else
00077 #ifdef WIN32
00078 #define IS_WINDOWS
00079 #define IS_WIN32
00080 #define IS_32
00081 #else
00082 #ifdef __NT__
00083 #define IS_WINDOWS
00084 #define IS_WIN32
00085 #define IS_32
00086 #else
00087 #ifdef __WIN32__
00088 #define IS_WINDOWS
00089 #define IS_WIN32
00090 #define IS_32
00091 #else
00092 #ifdef _WINDOWS
00093 #define IS_WINDOWS
00094 #define IS_WIN16
00095 #define IS_16
00096 #else
00097 #ifdef _WINDLL
00098 #define IS_WINDOWS
00099 #define IS_WIN16
00100 #define IS_16
00101 #else
00102 #ifdef WINDOWS
00103 #define IS_WINDOWS
00104 #define IS_WIN16
00105 #define IS_16
00106 #else
00107 #ifdef __WINDOWS__
00108 #define IS_WINDOWS
00109 #define IS_WIN16
00110 #define IS_16
00111 #else
00112 #ifdef _Windows
00113 #define IS_WINDOWS
00114 #define IS_WIN16
00115 #define IS_16
00116 #endif
00117 #endif
00118 #endif
00119 #endif
00120 #endif
00121 #endif
00122 #endif
00123 #endif
00124 #endif
00125 #endif
00126
00127 #if (!defined(IS_DOS) && !defined(IS_WINDOWS))
00128 #error MSS.H did not detect your platform. Define __DOS__, _WINDOWS, or WIN32.
00129 #endif
00130
00131
00132 #ifdef _PUSHPOP_SUPPORTED
00133 #pragma pack(push,1)
00134 #else
00135 #pragma pack(1)
00136 #endif
00137
00138 #ifdef __cplusplus
00139 extern "C" {
00140 #endif
00141
00142 #ifdef IS_DOS
00143
00144 #define AILCALLBACK __pascal
00145 #define AILEXPORT cdecl
00146 #define DXDEC extern
00147 #define DXDEF
00148 #define AILCALL cdecl
00149 #define FAR
00150 #define HIWORD(ptr) (((U32)ptr)>>16)
00151 #define LOWORD(ptr) ((U16)((U32)ptr))
00152
00153 #define FOURCC U32
00154
00155 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
00156 ((U32)(U8)(ch0) | ((U32)(U8)(ch1) << 8) | \
00157 ((U32)(U8)(ch2) << 16) | ((U32)(U8)(ch3) << 24 ))
00158
00159 #define mmioFOURCC(w,x,y,z) MAKEFOURCC(w,x,y,z)
00160
00161 #define AILLIBCALLBACK __pascal
00162
00163 #else
00164
00165 #define AILLIBCALLBACK WINAPI
00166
00167 #ifndef WIN32_LEAN_AND_MEAN
00168 #define WIN32_LEAN_AND_MEAN
00169 #endif
00170
00171 #ifndef WIN32_EXTRA_LEAN
00172 #define WIN32_EXTRA_LEAN
00173 #endif
00174
00175 #ifndef STRICT
00176 #define STRICT
00177 #endif
00178
00179 #include <windows.h>
00180 #include <mmsystem.h>
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190 #ifdef IS_WIN32
00191
00192 #define AILEXPORT WINAPI
00193
00194 #ifdef BUILD_MSS
00195 #define DXDEC __declspec(dllexport)
00196 #define DXDEF __declspec(dllexport)
00197 #else
00198
00199 #ifdef __BORLANDC__
00200 #define DXDEC extern
00201 #else
00202 #define DXDEC __declspec(dllimport)
00203 #endif
00204
00205 #endif
00206
00207 #define MSSDLLNAME "MSS32.DLL"
00208
00209 #else
00210
00211 #define AILEXPORT __export WINAPI
00212
00213 #define DXDEC extern
00214 #define DXDEF
00215
00216 #define MSSDLLNAME "MSS16.DLL"
00217
00218 #endif
00219
00220 #define AILCALL WINAPI
00221 #define AILCALLBACK AILEXPORT
00222
00223 typedef LPVOID AILLPDIRECTSOUND;
00224 typedef LPVOID AILLPDIRECTSOUNDBUFFER;
00225
00226 #endif
00227
00228 #ifndef NULL
00229 #define NULL 0
00230 #endif
00231
00232
00233
00234
00235
00236 #define MAX_DRVRS 16 // Max. # of simultaneous drivers
00237 #define MAX_TIMERS 16 // Max. # of simultaneous timers
00238 #define MAX_NOTES 32 // Max # of notes "on"
00239 #define FOR_NEST 4 // # of nested XMIDI FOR loops
00240 #define NUM_CHANS 16 // # of possible MIDI channels
00241 #define MAX_W_VOICES 16 // Max virtual wave synth voice cnt
00242 #define MAX_W_ENTRIES 512 // 512 wave library entries max.
00243
00244 #define MIN_CHAN ( 1-1) // Min channel recognized (0-based)
00245 #define MAX_CHAN (16-1) // Max channel recognized
00246 #define MIN_LOCK_CHAN ( 2-1) // Min channel available for locking
00247 #define MAX_LOCK_CHAN ( 9-1) // Max channel available for locking
00248 #define PERCUSS_CHAN (10-1) // Percussion channel (no locking)
00249
00250 #define AIL_MAX_FILE_HEADER_SIZE 4096 // AIL_set_named_sample_file() requires at least 4K
00251
00252
00253 #define DIG_F_16BITS_MASK 1
00254 #define DIG_F_STEREO_MASK 2
00255 #define DIG_F_ADPCM_MASK 4
00256
00257 #define DIG_F_MONO_8 0 // PCM data formats
00258 #define DIG_F_MONO_16 (DIG_F_16BITS_MASK)
00259 #define DIG_F_STEREO_8 (DIG_F_STEREO_MASK)
00260 #define DIG_F_STEREO_16 (DIG_F_STEREO_MASK|DIG_F_16BITS_MASK)
00261 #define DIG_F_ADPCM_MONO_16 (DIG_F_ADPCM_MASK |DIG_F_16BITS_MASK)
00262 #define DIG_F_ADPCM_STEREO_16 (DIG_F_ADPCM_MASK |DIG_F_16BITS_MASK|DIG_F_STEREO_MASK)
00263
00264 #define DIG_PCM_SIGN 0x0001 // (obsolete)
00265 #define DIG_PCM_ORDER 0x0002
00266
00267 #define DIG_PCM_POLARITY 0x0004 // PCM flags used by driver hardware
00268 #define DIG_PCM_SPLIT 0x0008
00269 #define DIG_BUFFER_SERVICE 0x0010
00270 #define DIG_DUAL_DMA 0x0020
00271 #define DIG_RECORDING_SUPPORTED 0x8000
00272
00273 #define WAVE_FORMAT_PCM 1
00274 #define WAVE_FORMAT_IMA_ADPCM 0x0011
00275
00276 #ifdef IS_DOS
00277
00278 #define AIL3DIG 0 // .DIG driver
00279 #define AIL3MDI 1 // .MDI driver
00280
00281 #define DIG_DETECT_8_BIT_ONLY 0x0001 // Detect 8-bit DMA only
00282 #define DIG_DETECT_16_BIT_ONLY 0x0002 // Detect 16-bit DMA only
00283 #define DIG_DETECT_8_AND_16_BITS 0x0003 // Detect both 8- and 16-bit DMA
00284
00285 #define DRV_INIT 0x300 // Functions common to .MDI and .DIG
00286 #define DRV_GET_INFO 0x301 // drivers
00287 #define DRV_SERVE 0x302
00288 #define DRV_PARSE_ENV 0x303
00289 #define DRV_VERIFY_IO 0x304
00290 #define DRV_INIT_DEV 0x305
00291 #define DRV_SHUTDOWN_DEV 0x306
00292
00293 #define DIG_HW_VOLUME 0x400 // .DIG driver functions
00294 #define DIG_START_P_CMD 0x401
00295 #define DIG_STOP_P_REQ 0x402
00296 #define DIG_START_R_CMD 0x403
00297 #define DIG_STOP_R_REQ 0x404
00298 #define DIG_VSE 0x405
00299
00300 #define MDI_HW_VOLUME 0x500 // .MDI driver functions
00301 #define MDI_INIT_INS_MGR 0x501
00302 #define MDI_MIDI_XMIT 0x502
00303 #define MDI_INSTALL_T_SET 0x503
00304 #define MDI_GET_T_STATUS 0x504
00305 #define MDI_PROT_UNPROT_T 0x505
00306 #define MDI_VSE 0x506
00307
00308 #else
00309
00310
00311
00312
00313
00314 #define MIDI_NULL_DRIVER ((U32)(S32)-2)
00315
00316 #endif
00317
00318
00319
00320
00321
00322
00323 #define SYSEX_BYTE 105
00324 #define PB_RANGE 106
00325 #define CHAN_MUTE 107
00326 #define CALLBACK_PFX 108
00327 #define SEQ_BRANCH 109
00328 #define CHAN_LOCK 110
00329 #define CHAN_PROTECT 111
00330 #define VOICE_PROTECT 112
00331 #define TIMBRE_PROTECT 113
00332 #define PATCH_BANK_SEL 114
00333 #define INDIRECT_C_PFX 115
00334 #define FOR_LOOP 116
00335 #define NEXT_LOOP 117
00336 #define CLEAR_BEAT_BAR 118
00337 #define CALLBACK_TRIG 119
00338 #define SEQ_INDEX 120
00339
00340 #define GM_BANK_MSB 0
00341 #define MODULATION 1
00342 #define DATA_MSB 6
00343 #define PART_VOLUME 7
00344 #define PANPOT 10
00345 #define EXPRESSION 11
00346 #define GM_BANK_LSB 32
00347 #define DATA_LSB 38
00348 #define SUSTAIN 64
00349 #define REVERB 91
00350 #define CHORUS 93
00351 #define RPN_LSB 100
00352 #define RPN_MSB 101
00353 #define RESET_ALL_CTRLS 121
00354 #define ALL_NOTES_OFF 123
00355
00356 #define EV_NOTE_OFF 0x80
00357 #define EV_NOTE_ON 0x90
00358 #define EV_POLY_PRESS 0xa0
00359 #define EV_CONTROL 0xb0
00360 #define EV_PROGRAM 0xc0
00361 #define EV_CHAN_PRESS 0xd0
00362 #define EV_PITCH 0xe0
00363 #define EV_SYSEX 0xf0
00364 #define EV_ESC 0xf7
00365 #define EV_META 0xff
00366
00367 #define META_EOT 0x2f
00368 #define META_TEMPO 0x51
00369 #define META_TIME_SIG 0x58
00370
00371
00372
00373
00374
00375 #define SSD_EOD_CALLBACK 0 // Application end-of-data callback if not NULL
00376 #define VOC_BLK_PTR 1 // Pointer to current block
00377 #define VOC_REP_BLK 2 // Pointer to beginning of repeat loop block
00378 #define VOC_N_REPS 3 // # of iterations left in repeat loop
00379 #define VOC_MARKER 4 // Marker to search for, or -1 if all
00380 #define VOC_MARKER_FOUND 5 // Desired marker found if 1, else 0
00381 #define SSD_RELEASE 6 // Release sample handle upon termination if >0
00382 #ifdef IS_WINDOWS
00383 #define SSD_EOD_CB_WIN32S 7 // Application end-of-data callback is in Win32s
00384 #else
00385 #define SSD_TEMP 7 // Temporary storage location for general use
00386 #endif
00387
00388
00389
00390
00391
00392 #define AILT_FREE 0 // Timer handle is free for allocation
00393 #define AILT_STOPPED 1 // Timer is stopped
00394 #define AILT_RUNNING 2 // Timer is running
00395
00396
00397
00398
00399
00400 #define SMP_FREE 0x0001 // Sample is available for allocation
00401
00402 #define SMP_DONE 0x0002 // Sample has finished playing, or has
00403
00404
00405 #define SMP_PLAYING 0x0004 // Sample is playing
00406
00407 #define SMP_STOPPED 0x0008 // Sample has been stopped
00408
00409 #define SMP_PLAYINGBUTRELEASED 0x0010 // Sample is playing, but digital handle
00410
00411
00412
00413
00414
00415
00416
00417
00418 #define SEQ_FREE 0x0001 // Sequence is available for allocation
00419
00420 #define SEQ_DONE 0x0002 // Sequence has finished playing, or has
00421
00422
00423 #define SEQ_PLAYING 0x0004 // Sequence is playing
00424
00425 #define SEQ_STOPPED 0x0008 // Sequence has been stopped
00426
00427 #define SEQ_PLAYINGBUTRELEASED 0x0010 // Sequence is playing, but MIDI handle
00428
00429
00430 #ifdef IS_DOS
00431
00432
00433
00434
00435
00436 #define MDIDRVRTYPE_GM 0 // General MIDI driver (Roland-compatible)
00437 #define MDIDRVRTYPE_FM_2 1 // 2-operator FM MIDI driver (OPL2)
00438 #define MDIDRVRTYPE_FM_4 2 // 4-operator FM MIDI driver (OPL3)
00439 #define MDIDRVRTYPE_SPKR 3 // Tandy or PC speaker "beep" driver
00440
00441
00442
00443
00444
00445 #define AIL_INIT_SUCCESS 0 // Driver installed successfully
00446 #define AIL_NO_INI_FILE 1 // No MDI.INI or DIG.INI file exists
00447 #define AIL_INIT_FAILURE 2 // Driver could not be initialized
00448
00449 #ifdef __BORLANDC__
00450
00451 #ifndef REALPTR
00452 #define REALPTR(x) ((void *) (U32) ((((U32) (x))>>16<<4) + ((x) & 0xffff) \
00453 - AIL_sel_base(_DS)))
00454 #endif
00455
00456 #else
00457
00458 #ifndef REALPTR
00459 #define REALPTR(x) ((void *) (U32) ((((U32) (x))>>16<<4) + ((x) & 0xffff)))
00460 #endif
00461
00462 #endif
00463
00464 #else
00465
00466
00467
00468
00469
00470 #define AILDS_RELINQUISH 0 // App returns control of secondary buffer
00471 #define AILDS_SEIZE 1 // App takes control of secondary buffer
00472 #define AILDS_SEIZE_LOOP 2 // App wishes to loop the secondary buffer
00473
00474 #endif
00475
00476
00477
00478
00479
00480 #ifndef C8
00481 #define C8 char
00482 #endif
00483
00484 #ifndef U8
00485 #define U8 unsigned char
00486 #endif
00487
00488 #ifndef S8
00489 #define S8 signed char
00490 #endif
00491
00492 #ifndef U16
00493 #define U16 unsigned short
00494 #endif
00495
00496 #ifndef S16
00497 #define S16 signed short
00498 #endif
00499
00500 #ifndef U32
00501 #define U32 unsigned long
00502 #endif
00503
00504 #ifndef S32
00505 #define S32 signed long
00506 #endif
00507
00508 #ifndef F32
00509 #define F32 float
00510 #endif
00511
00512 #ifndef F64
00513 #define F64 double
00514 #endif
00515
00516
00517 #ifndef REALFAR
00518 #define REALFAR unsigned long
00519 #endif
00520
00521 #ifndef FILE_ERRS
00522 #define FILE_ERRS
00523
00524 #define AIL_NO_ERROR 0
00525 #define AIL_IO_ERROR 1
00526 #define AIL_OUT_OF_MEMORY 2
00527 #define AIL_FILE_NOT_FOUND 3
00528 #define AIL_CANT_WRITE_FILE 4
00529 #define AIL_CANT_READ_FILE 5
00530 #define AIL_DISK_FULL 6
00531
00532 #endif
00533
00534 #define MIN_VAL 0
00535 #define NOM_VAL 1
00536 #define MAX_VAL 2
00537
00538 #ifndef YES
00539 #define YES 1
00540 #endif
00541
00542 #ifndef NO
00543 #define NO 0
00544 #endif
00545
00546 #ifndef TRUE
00547 #define TRUE 1
00548 #endif
00549
00550 #ifndef FALSE
00551 #define FALSE 0
00552 #endif
00553
00554
00555
00556
00557
00558 #define DIG_RESAMPLING_TOLERANCE 0
00559 #define DEFAULT_DRT 655 // Resampling triggered at +/- 1%
00560
00561 #define DIG_MIXER_CHANNELS 1
00562 #define DEFAULT_DMC 24 // 24 allocatable SAMPLE structures
00563
00564 #define DIG_DEFAULT_VOLUME 2
00565 #define DEFAULT_DDV 127 // Default sample volume = 127 (0-127)
00566
00567 #define MDI_SERVICE_RATE 3
00568 #define DEFAULT_MSR 120 // XMIDI sequencer timing = 120 Hz
00569
00570 #define MDI_SEQUENCES 4
00571 #define DEFAULT_MS 8 // 8 sequence handles/driver
00572
00573 #define MDI_DEFAULT_VOLUME 5
00574 #define DEFAULT_MDV 127 // Default sequence volume = 127 (0-127)
00575
00576 #define MDI_QUANT_ADVANCE 6
00577 #define DEFAULT_MQA 1 // Beat/bar count +1 interval
00578
00579 #define MDI_ALLOW_LOOP_BRANCHING 7
00580 #define DEFAULT_ALB NO // Branches cancel XMIDI FOR loops
00581
00582 #define MDI_DEFAULT_BEND_RANGE 8
00583 #define DEFAULT_MDBR 2 // Default pitch-bend range = 2
00584
00585 #define MDI_DOUBLE_NOTE_OFF 9
00586 #define DEFAULT_MDNO NO // For stuck notes on SB daughterboards
00587
00588 #define DIG_ENABLE_RESAMPLE_FILTER 31 // Enable resampling filter by
00589 #define DEFAULT_DERF YES // default
00590
00591 #define DIG_DECODE_BUFFER_SIZE 32 // 2K decode buffer size by default
00592 #define DEFAULT_DDBS 2048
00593
00594 #ifdef IS_WINDOWS
00595
00596 #define DIG_USE_MSS_MIXER 33
00597 #define DEFAULT_DUMM YES // Use MSS mixer with DirectSound
00598
00599 #define DIG_DS_FRAGMENT_SIZE 34
00600 #define DEFAULT_DDFS 50 // Use 50 millisecond buffer fragments with DirectSound if MSS mixer in use
00601
00602 #define DIG_DS_FRAGMENT_CNT 35
00603 #define DEFAULT_DDFC 2 // Use 2 buffer fragments with DirectSound if MSS mixer in use
00604
00605 #define DIG_DS_USE_PRIMARY 36
00606 #define DEFAULT_DDUP NO // Mix into secondary DirectSound buffer by default
00607
00608 #define DIG_DS_DSBCAPS_CTRL3D 37
00609 #define DEFAULT_DDDC NO // Do not use DSBCAPS_CTRL3D by default
00610
00611 #define DIG_DS_CREATION_HANDLER 38
00612 #define DEFAULT_DDCH NULL // Use DirectSoundCreate() by default
00613
00614 #define MDI_SYSEX_BUFFER_SIZE 10
00615 #define DEFAULT_MSBS 1536 // Default sysex buffer = 1536 bytes
00616
00617 #define DIG_OUTPUT_BUFFER_SIZE 11
00618 #define DEFAULT_DOBS 49152 // 48K output buffer size
00619
00620 #define AIL_MM_PERIOD 12
00621 #define DEFAULT_AMP 5 // Default MM timer period = 5 msec.
00622
00623 #define AIL_TIMERS 13
00624 #define DEFAULT_AT 16 // 16 allocatable HTIMER handles
00625
00626 #define DIG_MIN_CHAIN_ELEMENT_SIZE 14
00627 #define DEFAULT_MCES 2048 // 2048 bytes/waveOut buffer
00628
00629 #define DIG_USE_WAVEOUT 15
00630 #define DEFAULT_DUW NO // Use DirectSound by default
00631
00632 #define DIG_DS_SECONDARY_SIZE 16
00633 #define DEFAULT_DDSS (32*1024L) // Must be 2^n -- use 32K by default
00634
00635 #define DIG_DS_SAMPLE_CEILING 17
00636 #define DEFAULT_DDSC 44100 // Allow up to 44 kHz samples
00637
00638 #define AIL_LOCK_PROTECTION 18
00639 #define DEFAULT_ALP YES // Suspend foreground thread by default
00640
00641 #define AIL_WIN32S_CALLBACK_SIZE 19
00642 #define DEFAULT_WCS 4096 // Size of callback data in bytes
00643
00644 #else
00645
00646 #define DIG_SERVICE_RATE 10
00647 #define DEFAULT_DSR 200 // DMA buffer-polling rate = 200 Hz
00648
00649 #define DIG_HARDWARE_SAMPLE_RATE 11
00650 #define DEFAULT_DHSR NOM_VAL // Use nominal sample rate by default
00651
00652 #define DIG_DMA_RESERVE 12
00653 #define DEFAULT_DDR 32768 // Reserve 32K real-mode mem for DMA
00654
00655 #define DIG_LATENCY 13
00656 #define DEFAULT_DL 100 // Half-buffer size in ms = 100
00657
00658 #define DIG_USE_STEREO 14
00659 #define DEFAULT_DUS NO // Use mono output only
00660
00661 #define DIG_USE_16_BITS 15
00662 #define DEFAULT_DU16 NO // Use 8-bit output by default
00663
00664 #define DIG_ALLOW_16_BIT_DMA 16
00665 #define DEFAULT_DA16DMA YES // OK to use 16-bit DMA if necessary
00666
00667 #define DIG_SS_LOCK 17
00668 #define DEFAULT_DSL NO // Don't disable IRQs while mixing
00669
00670 #define AIL_SCAN_FOR_HARDWARE 18
00671 #define DEFAULT_ASH YES // Scan for I/O settings if necessary
00672
00673 #define AIL_ALLOW_VDM_EXECUTION 19
00674 #define DEFAULT_AVE YES // Allow Windows "DOS box" execution
00675
00676 #endif
00677
00678
00679
00680
00681
00682
00683
00684 #define DLS_TIMEBASE 20
00685 #define DEFAULT_DTB 120 // 120 intervals/second by default
00686
00687 #define DLS_VOICE_LIMIT 21
00688 #define DEFAULT_DVL 24 // 24 voices supported
00689
00690 #define DLS_BANK_SELECT_ALIAS 22
00691 #define DEFAULT_DBSA NO // Do not treat controller 114 as bank
00692
00693 #define DLS_STREAM_BOOTSTRAP 23 // Don't submit first stream buffer
00694 #define DEFAULT_DSB YES // until at least 2 available
00695
00696 #define DLS_VOLUME_BOOST 24
00697 #define DEFAULT_DVB 0 // Boost final volume by 0 dB
00698
00699 #define DLS_ENABLE_FILTERING 25 // Filtering = on by default
00700 #define DEFAULT_DEF YES // (may be changed at any time)
00701
00702 #define DLS_ENABLE_GLOBAL_REVERB 26 // Global reverb disabled by default
00703 #define DEFAULT_DEGR NO
00704
00705 #define AIL_ENABLE_MMX_SUPPORT 27 // Enable MMX support if present
00706 #define DEFAULT_AEMS YES // (may be changed at any time)
00707
00708 #define DLS_GM_PASSTHROUGH 28 // Pass unrecognized traffic on to
00709 #define DEFAULT_DGP YES // default GM driver layer
00710
00711
00712 #define DLS_GLOBAL_REVERB_LEVEL 29 // Reverb level 0-127
00713 #define DEFAULT_GRL 20 // (may be changed at any time)
00714
00715 #define DLS_GLOBAL_REVERB_TIME 30 // Reverb time in stream buffers
00716 #define DEFAULT_GRT 1
00717
00718 #define DLS_ADPCM_TO_ASI_THRESHOLD 39 // Size in samples to switch to ASI
00719 #define DEFAULT_DATAT 32768
00720
00721 #define N_PREFS 40 // # of preference types
00722
00723
00724
00725
00726 #ifdef IS_WIN32
00727
00728 #ifdef BUILD_MSS
00729
00730 #define MSSLockedIncrement(var) _asm { lock inc [var] }
00731 #define MSSLockedDecrement(var) _asm { lock dec [var] }
00732
00733 static void __MSSLockedIncrementAddr(void * addr)
00734 {
00735 _asm {
00736 mov eax,[addr]
00737 lock inc dword ptr [eax]
00738 }
00739 }
00740
00741 static void __MSSLockedDecrementAddr(void * addr)
00742 {
00743 _asm {
00744 mov eax,[addr]
00745 lock dec dword ptr [eax]
00746 }
00747 }
00748
00749 #define MSSLockedIncrementPtr(var) __MSSLockedIncrementAddr(&(var))
00750 #define MSSLockedDecrementPtr(var) __MSSLockedDecrementAddr(&(var))
00751
00752 #else
00753
00754 #define MSSLockedIncrement(var) (++var)
00755 #define MSSLockedDecrement(var) (--var)
00756
00757 #define MSSLockedIncrementPtr(var) (++var)
00758 #define MSSLockedDecrementPtr(var) (--var)
00759
00760 #endif
00761
00762 #else
00763 #define MSSLockedIncrement(var) (++var)
00764 #define MSSLockedDecrement(var) (--var)
00765
00766 #define MSSLockedIncrementPtr(var) (++var)
00767 #define MSSLockedDecrementPtr(var) (--var)
00768 #endif
00769
00770 #ifndef RIB_H // RIB.H contents included if RIB.H not already included
00771
00772
00773
00774 #define RIB_H
00775 #define ARY_CNT(x) (sizeof((x)) / sizeof((x)[0]))
00776
00777
00778
00779
00780
00781 typedef S32 RIBRESULT;
00782
00783 #define RIB_NOERR 0 // Success -- no error
00784 #define RIB_NOT_ALL_AVAILABLE 1 // Some requested functions/attribs not available
00785 #define RIB_NOT_FOUND 2 // Resource not found
00786 #define RIB_OUT_OF_MEM 3 // Out of system RAM
00787
00788
00789
00790
00791
00792 typedef U32 HPROVIDER;
00793
00794
00795
00796
00797
00798
00799 typedef U32 HATTRIB;
00800
00801
00802
00803
00804
00805
00806
00807
00808 typedef U32 HINTENUM;
00809 #define HINTENUM_FIRST 0
00810
00811
00812
00813
00814
00815
00816
00817
00818 typedef U32 HPROENUM;
00819 #define HPROENUM_FIRST 0
00820
00821
00822
00823
00824
00825 typedef enum
00826 {
00827 RIB_NONE = 0,
00828 RIB_CUSTOM,
00829 RIB_DEC,
00830 RIB_HEX,
00831 RIB_FLOAT,
00832 RIB_PERCENT,
00833 RIB_BOOL,
00834 RIB_STRING
00835 }
00836 RIB_DATA_SUBTYPE;
00837
00838
00839
00840
00841
00842 typedef enum
00843 {
00844 RIB_FUNCTION = 0,
00845 RIB_ATTRIBUTE,
00846 RIB_PREFERENCE
00847 }
00848 RIB_ENTRY_TYPE;
00849
00850
00851
00852
00853
00854
00855 typedef struct
00856 {
00857 RIB_ENTRY_TYPE type;
00858 C8 FAR *entry_name;
00859 U32 token;
00860 RIB_DATA_SUBTYPE subtype;
00861 }
00862 RIB_INTERFACE_ENTRY;
00863
00864
00865
00866
00867
00868 #define PROVIDER_NAME (-100) // RIB_STRING name of decoder
00869 #define PROVIDER_VERSION (-101) // RIB_HEX BCD version number
00870
00871
00872
00873
00874
00875
00876
00877
00878 typedef U32 (AILCALL FAR *PROVIDER_QUERY_ATTRIBUTE) (HATTRIB index);
00879
00880
00881
00882
00883
00884
00885 #define FN(entry_name) { RIB_FUNCTION, #entry_name, (U32) &(entry_name), RIB_NONE }
00886 #define REG_FN(entry_name) { RIB_FUNCTION, #entry_name, (U32) &(entry_name), RIB_NONE }
00887
00888 #define AT(entry_name,ID) { RIB_ATTRIBUTE, (entry_name), (U32) &(ID), RIB_NONE }
00889 #define REG_AT(entry_name,ID,subtype) { RIB_ATTRIBUTE, (entry_name), (U32) (ID), subtype }
00890
00891 #define PR(entry_name,ID) { RIB_PREFERENCE, (entry_name), (U32) &(ID), RIB_NONE }
00892 #define REG_PR(entry_name,ID,subtype) { RIB_PREFERENCE, (entry_name), (U32) (ID), subtype }
00893
00894 #define RIB_register(x,y,z) RIB_register_interface (HPROVIDER(x), y, ARY_CNT(z), z)
00895 #define RIB_unregister(x,y,z) RIB_unregister_interface(HPROVIDER(x), y, ARY_CNT(z), z)
00896 #define RIB_unregister_all(x) RIB_unregister_interface(HPROVIDER(x), NULL, 0, NULL)
00897 #define RIB_free_libraries() RIB_free_provider_library(HPROVIDER(NULL));
00898 #define RIB_request(x,y,z) RIB_request_interface (x, y, ARY_CNT(z), z)
00899
00900
00901
00902
00903
00904 DXDEC HPROVIDER AILCALL RIB_alloc_provider_handle (U32 module);
00905 DXDEC void AILCALL RIB_free_provider_handle (HPROVIDER provider);
00906
00907 DXDEC HPROVIDER AILCALL RIB_load_provider_library (C8 FAR *filename);
00908 DXDEC void AILCALL RIB_free_provider_library (HPROVIDER provider);
00909
00910 DXDEC HPROVIDER AILCALL RIB_provider_library_handle (void);
00911
00912 DXDEC RIBRESULT AILCALL RIB_register_interface (HPROVIDER provider,
00913 C8 FAR *interface_name,
00914 S32 entry_count,
00915 const RIB_INTERFACE_ENTRY FAR *list);
00916
00917 DXDEC RIBRESULT AILCALL RIB_unregister_interface (HPROVIDER provider,
00918 C8 FAR *interface_name,
00919 S32 entry_count,
00920 const RIB_INTERFACE_ENTRY FAR *list);
00921
00922 DXDEC RIBRESULT AILCALL RIB_request_interface (HPROVIDER provider,
00923 C8 FAR *interface_name,
00924 S32 entry_count,
00925 RIB_INTERFACE_ENTRY FAR *list);
00926
00927 DXDEC RIBRESULT AILCALL RIB_request_interface_entry (HPROVIDER provider,
00928 C8 FAR *interface_name,
00929 RIB_ENTRY_TYPE entry_type,
00930 C8 FAR *entry_name,
00931 U32 FAR *token);
00932
00933 DXDEC S32 AILCALL RIB_enumerate_interface (HPROVIDER provider,
00934 C8 FAR *interface_name,
00935 RIB_ENTRY_TYPE type,
00936 HINTENUM FAR *next,
00937 RIB_INTERFACE_ENTRY FAR *dest);
00938
00939 DXDEC S32 AILCALL RIB_enumerate_providers (C8 FAR *interface_name,
00940 HPROENUM FAR *next,
00941 HPROVIDER FAR *dest);
00942
00943 DXDEC C8 FAR * AILCALL RIB_type_string (U32 data,
00944 RIB_DATA_SUBTYPE subtype);
00945
00946 DXDEC HPROVIDER AILCALL RIB_find_file_provider (C8 FAR *interface_name,
00947 C8 FAR *attribute_name,
00948 C8 FAR *file_suffix);
00949
00950 DXDEC S32 AILCALL RIB_load_application_providers
00951 (C8 FAR *filespec);
00952
00953 DXDEC void AILCALL RIB_set_provider_user_data (HPROVIDER provider,
00954 U32 index,
00955 S32 value);
00956
00957 DXDEC S32 AILCALL RIB_provider_user_data (HPROVIDER provider,
00958 U32 index);
00959
00960 DXDEC void AILCALL RIB_set_provider_system_data
00961 (HPROVIDER provider,
00962 U32 index,
00963 S32 value);
00964
00965 DXDEC S32 AILCALL RIB_provider_system_data (HPROVIDER provider,
00966 U32 index);
00967
00968 DXDEC C8 FAR * AILCALL RIB_error (void);
00969
00970 #endif
00971
00972 #ifndef MSS_ASI_VERSION // MSSASI.H contents included if MSSASI.H not already included
00973
00974
00975
00976 #define AIL_ASI_VERSION 1
00977 #define AIL_ASI_REVISION 0
00978
00979
00980
00981
00982
00983 typedef S32 HASISTREAM;
00984
00985
00986
00987
00988
00989 typedef S32 ASIRESULT;
00990
00991 #define ASI_NOERR 0 // Success -- no error
00992 #define ASI_NOT_ENABLED 1 // ASI not enabled
00993 #define ASI_ALREADY_STARTED 2 // ASI already started
00994 #define ASI_INVALID_PARAM 3 // Invalid parameters used
00995 #define ASI_INTERNAL_ERR 4 // Internal error in ASI driver
00996 #define ASI_OUT_OF_MEM 5 // Out of system RAM
00997 #define ASI_ERR_NOT_IMPLEMENTED 6 // Feature not implemented
00998 #define ASI_NOT_FOUND 7 // ASI supported device not found
00999 #define ASI_NOT_INIT 8 // ASI not initialized
01000 #define ASI_CLOSE_ERR 9 // ASI not closed correctly
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019
01020
01021 typedef S32 (AILCALLBACK FAR * AILASIFETCHCB) (U32 user,
01022 void FAR *dest,
01023 S32 bytes_requested,
01024 S32 offset);
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041 typedef ASIRESULT (AILCALL FAR *ASI_STARTUP)(void);
01042
01043
01044
01045
01046
01047 typedef ASIRESULT (AILCALL FAR *ASI_SHUTDOWN)(void);
01048
01049
01050
01051
01052
01053
01054
01055
01056 typedef C8 FAR * (AILCALL FAR *ASI_ERROR)(void);
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068 typedef HASISTREAM (AILCALL FAR *ASI_STREAM_OPEN) (U32 user,
01069 AILASIFETCHCB fetch_CB,
01070 U32 total_size);
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080 typedef S32 (AILCALL FAR *ASI_STREAM_PROCESS) (HASISTREAM stream,
01081 void FAR *buffer,
01082 S32 buffer_size);
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109 typedef ASIRESULT (AILCALL FAR *ASI_STREAM_SEEK) (HASISTREAM stream,
01110 S32 stream_offset);
01111
01112
01113
01114
01115
01116 typedef S32 (AILCALL FAR *ASI_STREAM_ATTRIBUTE) (HASISTREAM stream,
01117 HATTRIB attrib);
01118
01119
01120
01121
01122
01123 typedef S32 (AILCALL FAR *ASI_STREAM_SET_PREFERENCE) (HASISTREAM stream,
01124 HATTRIB preference,
01125 S32 value);
01126
01127
01128
01129
01130
01131 typedef ASIRESULT (AILCALL FAR *ASI_STREAM_CLOSE) (HASISTREAM stream);
01132
01133 #endif
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145 typedef enum
01146 {
01147 SNDPOS_BYTES,
01148 SNDPOS_SAMPLES,
01149 SNDPOS_MS
01150 }
01151 AILSNDPOSTYPE;
01152
01153 typedef void FAR * H3DPOBJECT;
01154 typedef H3DPOBJECT H3DSAMPLE;
01155
01156
01157
01158
01159
01160 typedef S32 M3DRESULT;
01161
01162 #define M3D_NOERR 0 // Success -- no error
01163 #define M3D_NOT_ENABLED 1 // M3D not enabled
01164 #define M3D_ALREADY_STARTED 2 // M3D already started
01165 #define M3D_INVALID_PARAM 3 // Invalid parameters used
01166 #define M3D_INTERNAL_ERR 4 // Internal error in M3D driver
01167 #define M3D_OUT_OF_MEM 5 // Out of system RAM
01168 #define M3D_ERR_NOT_IMPLEMENTED 6 // Feature not implemented
01169 #define M3D_NOT_FOUND 7 // M3D supported device not found
01170 #define M3D_NOT_INIT 8 // M3D not initialized
01171 #define M3D_CLOSE_ERR 9 // M3D not closed correctly
01172
01173
01174 typedef M3DRESULT (AILCALL FAR *M3D_STARTUP)(void);
01175
01176 typedef M3DRESULT (AILCALL FAR *M3D_SHUTDOWN)(void);
01177
01178 typedef C8 FAR * (AILCALL FAR *M3D_ERROR)(void);
01179
01180 typedef S32 (AILCALL FAR *M3D_SET_PROVIDER_PREFERENCE)(HATTRIB preference,
01181 S32 value);
01182
01183 typedef M3DRESULT (AILCALL FAR * M3D_ACTIVATE)(S32 enable);
01184
01185 typedef H3DSAMPLE (AILCALL FAR * M3D_ALLOCATE_3D_SAMPLE_HANDLE)(void);
01186
01187
01188 typedef void (AILCALL FAR * M3D_RELEASE_3D_SAMPLE_HANDLE)(H3DSAMPLE samp);
01189
01190
01191 typedef void (AILCALL FAR * M3D_START_3D_SAMPLE)(H3DSAMPLE samp);
01192
01193
01194 typedef void (AILCALL FAR * M3D_STOP_3D_SAMPLE)(H3DSAMPLE samp);
01195
01196
01197 typedef void (AILCALL FAR * M3D_RESUME_3D_SAMPLE)(H3DSAMPLE samp);
01198
01199 typedef void (AILCALL FAR * M3D_END_3D_SAMPLE)(H3DSAMPLE samp);
01200
01201 typedef S32 (AILCALL FAR * M3D_SET_3D_SAMPLE_FILE)(H3DSAMPLE samp,
01202 void FAR *file_image);
01203
01204 typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_VOLUME)(H3DSAMPLE samp,
01205 S32 volume);
01206
01207 typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_OFFSET)(H3DSAMPLE samp,
01208 U32 offset);
01209
01210
01211 typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_LOOP_COUNT)(H3DSAMPLE samp,
01212 U32 loops);
01213
01214 typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_LOOP_BLOCK)(H3DSAMPLE S,
01215 S32 loop_start_offset,
01216 S32 loop_end_offset);
01217
01218 typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_STATUS)(H3DSAMPLE samp);
01219
01220 typedef S32 (AILCALL FAR * M3D_3D_SAMPLE_VOLUME)(H3DSAMPLE samp);
01221
01222 typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_OFFSET)(H3DSAMPLE samp,
01223 AILSNDPOSTYPE type);
01224
01225 typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_LENGTH)(H3DSAMPLE samp,
01226 AILSNDPOSTYPE type);
01227
01228 typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_LOOP_COUNT)(H3DSAMPLE samp);
01229
01230 typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_DISTANCES)(H3DSAMPLE samp,
01231 U32 max_front_dist,
01232 U32 min_front_dist,
01233 U32 max_back_dist,
01234 U32 min_back_dist);
01235
01236
01237 typedef void (AILCALL FAR * M3D_3D_SAMPLE_DISTANCES)(H3DSAMPLE samp,
01238 U32 FAR * max_front_dist,
01239 U32 FAR * min_front_dist,
01240 U32 FAR * max_back_dist,
01241 U32 FAR * min_back_dist);
01242
01243 typedef S32 (AILCALL FAR * M3D_ACTIVE_3D_SAMPLE_COUNT)(void);
01244
01245 typedef H3DPOBJECT (AILCALL FAR * M3D_3D_OPEN_LISTENER)(void);
01246
01247 typedef void (AILCALL FAR * M3D_3D_CLOSE_LISTENER)(H3DPOBJECT listener);
01248
01249 typedef H3DPOBJECT (AILCALL FAR * M3D_3D_OPEN_OBJECT)(void);
01250
01251 typedef void (AILCALL FAR * M3D_3D_CLOSE_OBJECT)(H3DPOBJECT obj);
01252
01253 typedef void (AILCALL FAR * M3D_SET_3D_POSITION)(H3DPOBJECT obj,
01254 F32 X,
01255 F32 Y,
01256 F32 Z);
01257
01258 typedef void (AILCALL FAR * M3D_SET_3D_VELOCITY)(H3DPOBJECT obj,
01259 F32 dX_per_ms,
01260 F32 dY_per_ms,
01261 F32 dZ_per_ms,
01262 F32 magnitude);
01263
01264 typedef void (AILCALL FAR * M3D_SET_3D_VELOCITY_VECTOR)(H3DPOBJECT obj,
01265 F32 dX_per_ms,
01266 F32 dY_per_ms,
01267 F32 dZ_per_ms);
01268
01269 typedef void (AILCALL FAR * M3D_SET_3D_ORIENTATION)(H3DPOBJECT obj,
01270 F32 X_face,
01271 F32 Y_face,
01272 F32 Z_face,
01273 F32 X_up,
01274 F32 Y_up,
01275 F32 Z_up);
01276
01277 typedef void (AILCALL FAR * M3D_3D_POSITION)(H3DPOBJECT obj,
01278 F32 FAR *X,
01279 F32 FAR *Y,
01280 F32 FAR *Z);
01281
01282 typedef void (AILCALL FAR * M3D_3D_VELOCITY)(H3DPOBJECT obj,
01283 F32 FAR *dX_per_ms,
01284 F32 FAR *dY_per_ms,
01285 F32 FAR *dZ_per_ms);
01286
01287 typedef void (AILCALL FAR * M3D_3D_ORIENTATION)(H3DPOBJECT obj,
01288 F32 FAR *X_face,
01289 F32 FAR *Y_face,
01290 F32 FAR *Z_face,
01291 F32 FAR *X_up,
01292 F32 FAR *Y_up,
01293 F32 FAR *Z_up);
01294
01295 typedef void (AILCALL FAR * M3D_3D_UPDATE_POSITION)(H3DPOBJECT obj,
01296 F32 dt_milliseconds);
01297
01298 typedef void (AILCALL FAR * M3D_3D_AUTO_UPDATE_POSITION)(H3DPOBJECT obj,
01299 S32 enable);
01300
01301
01302
01303
01304
01305
01306
01307
01308
01309
01310
01311 #define M_DEST_STEREO 1 // Set to enable stereo mixer output
01312 #define M_SRC_16 2 // Set to enable mixing of 16-bit samples
01313 #define M_FILTER 4 // Set to enable filtering when resampling
01314 #define M_SRC_STEREO 8 // Set to enable mixing of stereo input samples
01315 #define M_VOL_SCALING 16 // Set to enable volume scalars other than 2047
01316 #define M_RESAMPLE 32 // Set to enable playback ratios other than 65536
01317 #define M_ORDER 64 // Set to reverse L/R stereo order for sample
01318
01319 #ifdef IS_32
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330 typedef void (AILCALL FAR *MIXER_STARTUP)(void);
01331
01332
01333
01334
01335
01336 typedef void (AILCALL FAR *MIXER_SHUTDOWN)(void);
01337
01338
01339
01340
01341
01342 typedef void (AILCALL FAR *MIXER_FLUSH) (S32 FAR *dest,
01343 S32 len,
01344 S32 FAR *reverb_buffer,
01345 S32 reverb_level,
01346 U32 MMX_available);
01347
01348
01349
01350
01351
01352 typedef void (AILCALL FAR *MIXER_MERGE) (void FAR * FAR *src,
01353 U32 FAR *src_fract,
01354 void FAR *src_end,
01355 S32 FAR * FAR *dest,
01356 void FAR *dest_end,
01357 S32 FAR *left_val,
01358 S32 FAR *right_val,
01359 S32 playback_ratio,
01360 S32 scale_left,
01361 S32 scale_right,
01362 U32 operation,
01363 U32 MMX_available);
01364
01365
01366
01367
01368
01369 typedef void (AILCALL FAR *MIXER_COPY) (void FAR *src,
01370 S32 src_len,
01371 void FAR *dest,
01372 U32 operation,
01373 U32 MMX_available);
01374 #else
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384
01385 typedef void (AILCALL FAR *MIXER_STARTUP)(void);
01386
01387
01388
01389
01390
01391 typedef void (AILCALL FAR *MIXER_SHUTDOWN)(void);
01392
01393
01394
01395
01396
01397 typedef void (AILCALL FAR *MIXER_FLUSH) (S32 FAR *dest,
01398 S32 len,
01399 S32 FAR *reverb_buffer,
01400 S32 reverb_level,
01401 U32 MMX_available);
01402
01403
01404
01405
01406
01407 typedef void (AILCALL FAR *MIXER_MERGE) (U32 src_sel,
01408 U32 dest_sel,
01409 U32 FAR *src_fract,
01410 U32 FAR *src_offset,
01411 U32 FAR *dest_offset,
01412 U32 src_end_offset,
01413 U32 dest_end_offset,
01414 S32 FAR *left_val,
01415 S32 FAR *right_val,
01416 S32 playback_ratio,
01417 S32 scale_both,
01418 U32 operation);
01419
01420
01421
01422
01423
01424 typedef void (AILCALL FAR *MIXER_COPY) (void FAR *src,
01425 S32 src_len,
01426 void FAR *dest,
01427 U32 operation,
01428 U32 MMX_available);
01429 #endif
01430
01431
01432
01433
01434
01435 struct _DIG_DRIVER;
01436
01437 struct _MDI_DRIVER;
01438
01439 typedef struct _DIG_DRIVER FAR * HDIGDRIVER;
01440
01441 typedef struct _MDI_DRIVER FAR * HMDIDRIVER;
01442
01443 typedef struct _SAMPLE FAR * HSAMPLE;
01444
01445 typedef struct _SEQUENCE FAR * HSEQUENCE;
01446
01447 typedef S32 HTIMER;
01448
01449 #ifdef IS_DOS
01450
01451
01452
01453
01454
01455 typedef struct
01456 {
01457 S16 IO;
01458 S16 IRQ;
01459 S16 DMA_8_bit;
01460 S16 DMA_16_bit;
01461 S32 IO_reserved[4];
01462 }
01463 IO_PARMS;
01464
01465 typedef struct
01466 {
01467 S8 ID[8];
01468
01469 U32 driver_version;
01470
01471 REALFAR common_IO_configurations;
01472 U16 num_IO_configurations;
01473
01474 REALFAR environment_string;
01475
01476 IO_PARMS IO;
01477
01478 S16 service_rate;
01479
01480 U16 busy;
01481
01482 U16 driver_num;
01483
01484 U16 this_ISR;
01485 REALFAR prev_ISR;
01486
01487 S8 scratch[128];
01488
01489 S8 dev_name[80];
01490 }
01491 VDI_HDR;
01492
01493 typedef struct
01494 {
01495 U16 minimum_physical_sample_rate;
01496 U16 nominal_physical_sample_rate;
01497 U16 maximum_physical_sample_rate;
01498
01499 U16 minimum_DMA_half_buffer_size;
01500 U16 maximum_DMA_half_buffer_size;
01501
01502 U32 flags;
01503 }
01504 DIG_MODE;
01505
01506 typedef struct
01507 {
01508 U8 format_supported[16];
01509 DIG_MODE format_data[16];
01510 }
01511 DIG_DDT;
01512
01513 typedef struct
01514 {
01515 REALFAR DMA_buffer_A;
01516 REALFAR DMA_buffer_B;
01517 S16 active_buffer;
01518 }
01519 DIG_DST;
01520
01521 typedef struct
01522 {
01523 REALFAR library_environment;
01524 REALFAR GTL_suffix;
01525
01526 U16 num_voices;
01527
01528 U16 max_melodic_channel;
01529 U16 min_melodic_channel;
01530 U16 percussion_channel;
01531 }
01532 MDI_DDT;
01533
01534 typedef struct
01535 {
01536 S8 library_directory[128];
01537 S8 GTL_filename[128];
01538
01539 S8 MIDI_data[512];
01540 }
01541 MDI_DST;
01542
01543 typedef struct
01544 {
01545 char device_name[128];
01546 char driver_name[128];
01547 IO_PARMS IO;
01548 }
01549 AIL_INI;
01550
01551 typedef struct
01552 {
01553 REALFAR seg;
01554 U32 sel;
01555 void *buf;
01556 U32 size;
01557 VDI_HDR *VHDR;
01558 S32 type;
01559
01560 S32 initialized;
01561
01562 S32 PM_ISR;
01563
01564 HTIMER server;
01565
01566
01567
01568 void (AILCALL *destructor)(HDIGDRIVER);
01569
01570
01571 void *descriptor;
01572 }
01573 AIL_DRIVER;
01574
01575 typedef struct
01576 {
01577 S16 AX;
01578 S16 BX;
01579 S16 CX;
01580 S16 DX;
01581 S16 SI;
01582 S16 DI;
01583 }
01584 VDI_CALL;
01585
01586 #endif
01587
01588
01589
01590
01591
01592 typedef void (AILCALLBACK FAR* AILTIMERCB) (U32 user);
01593
01594 typedef void (AILCALLBACK FAR* AILSAMPLECB) (HSAMPLE sample);
01595
01596 typedef S32 (AILCALLBACK FAR* AILEVENTCB) (HMDIDRIVER hmi,HSEQUENCE seq,S32 status,S32 data_1,S32 data_2);
01597
01598 typedef S32 (AILCALLBACK FAR* AILTIMBRECB) (HMDIDRIVER hmi,S32 bank,S32 patch);
01599
01600 typedef S32 (AILCALLBACK FAR* AILPREFIXCB) (HSEQUENCE seq,S32 log,S32 data);
01601
01602 typedef void (AILCALLBACK FAR* AILTRIGGERCB) (HSEQUENCE seq,S32 log,S32 data);
01603
01604 typedef void (AILCALLBACK FAR* AILBEATCB) (HMDIDRIVER hmi,HSEQUENCE seq,S32 beat,S32 measure);
01605
01606 typedef void (AILCALLBACK FAR* AILSEQUENCECB) (HSEQUENCE seq);
01607
01608
01609
01610
01611
01612
01613
01614
01615 typedef enum
01616 {
01617 DP_ASI_DECODER,
01618 DP_POST_DECODER,
01619 DP_MERGE,
01620 N_SAMPLE_STAGES,
01621 SAMPLE_ALL_STAGES
01622 }
01623 SAMPLESTAGE;
01624
01625 typedef enum
01626 {
01627 DP_FLUSH = 0,
01628 DP_COPY,
01629 DP_POST_COPY,
01630 N_DIGDRV_STAGES,
01631 DIGDRV_ALL_STAGES
01632 }
01633 DIGDRVSTAGE;
01634
01635 typedef struct
01636 {
01637 ASI_STREAM_OPEN ASI_stream_open;
01638 ASI_STREAM_PROCESS ASI_stream_process;
01639 ASI_STREAM_SEEK ASI_stream_seek;
01640 ASI_STREAM_CLOSE ASI_stream_close;
01641 ASI_STREAM_ATTRIBUTE ASI_stream_attribute;
01642 ASI_STREAM_SET_PREFERENCE ASI_stream_set_preference;
01643
01644 HATTRIB INPUT_BIT_RATE;
01645 HATTRIB INPUT_SAMPLE_RATE;
01646 HATTRIB INPUT_BITS;
01647 HATTRIB INPUT_CHANNELS;
01648 HATTRIB OUTPUT_BIT_RATE;
01649 HATTRIB OUTPUT_SAMPLE_RATE;
01650 HATTRIB OUTPUT_BITS;
01651 HATTRIB OUTPUT_CHANNELS;
01652 HATTRIB POSITION;
01653 HATTRIB PERCENT_DONE;
01654 HATTRIB MIN_INPUT_BLOCK_SIZE;
01655 HATTRIB RAW_RATE;
01656 HATTRIB RAW_BITS;
01657 HATTRIB RAW_CHANNELS;
01658 HATTRIB REQUESTED_RATE;
01659 HATTRIB REQUESTED_BITS;
01660 HATTRIB REQUESTED_CHANS;
01661
01662 HASISTREAM stream;
01663 }
01664 ASISTAGE;
01665
01666 typedef struct
01667 {
01668 MIXER_FLUSH MSS_mixer_flush;
01669 MIXER_MERGE MSS_mixer_merge;
01670 MIXER_COPY MSS_mixer_copy;
01671 }
01672 MIXSTAGE;
01673
01674 typedef struct
01675 {
01676 int dummy;
01677 }
01678 FLTSTAGE;
01679
01680 typedef struct
01681 {
01682 S32 active;
01683 HPROVIDER provider;
01684
01685 union
01686 {
01687 ASISTAGE ASI;
01688 MIXSTAGE MIX;
01689 FLTSTAGE FLT;
01690 }
01691 TYPE;
01692 }
01693 DPINFO;
01694
01695
01696
01697
01698
01699 typedef struct _AILTIMER
01700 {
01701 U32 status;
01702 AILTIMERCB callback;
01703 U32 user;
01704
01705 S32 elapsed;
01706 S32 value;
01707 S32 callingCT;
01708 S32 callingDS;
01709 S32 IsWin32s;
01710 } AILTIMERSTR;
01711
01712 typedef struct _ADPCMDATATAG
01713 {
01714 U32 blocksize;
01715 U32 extrasamples;
01716 U32 blockleft;
01717 U32 step;
01718 U32 savesrc;
01719 U32 sample;
01720 U32 destend;
01721 U32 srcend;
01722 U32 samplesL;
01723 U32 samplesR;
01724 U16 moresamples[16];
01725 } ADPCMDATA;
01726
01727 typedef struct _SAMPLE
01728 {
01729 char tag[4];
01730
01731 HDIGDRIVER driver;
01732
01733 U32 status;
01734
01735 void FAR *start[2];
01736 U32 len [2];
01737 U32 pos [2];
01738 U32 done [2];
01739
01740 U32 src_fract;
01741 S32 left_val;
01742 S32 right_val;
01743
01744 S32 current_buffer;
01745 S32 last_buffer;
01746 S32 starved;
01747
01748 S32 loop_count;
01749 S32 loop_start;
01750 S32 loop_end;
01751
01752 S32 format;
01753 U32 flags;
01754
01755 S32 playback_rate;
01756
01757 S32 volume;
01758 S32 pan;
01759
01760 S32 left_scale;
01761 S32 right_scale;
01762
01763 S32 service_type;
01764
01765 AILSAMPLECB SOB;
01766 AILSAMPLECB EOB;
01767 AILSAMPLECB EOS;
01768
01769 S32 user_data [8];
01770 S32 system_data[8];
01771
01772 ADPCMDATA adpcm;
01773
01774 #ifdef IS_WINDOWS
01775
01776 S32 SOB_IsWin32s;
01777 S32 EOB_IsWin32s;
01778 S32 EOS_IsWin32s;
01779
01780
01781
01782
01783
01784 S32 secondary_buffer;
01785
01786 S32 service_interval;
01787 S32 service_tick;
01788 S32 buffer_segment_size;
01789
01790 S32 prev_segment;
01791 S32 prev_cursor;
01792
01793 S32 bytes_remaining;
01794
01795 S32 direct_control;
01796
01797 #endif
01798
01799 S32 doeob;
01800 S32 dosob;
01801 S32 doeos;
01802
01803
01804
01805
01806
01807 DPINFO pipeline[N_SAMPLE_STAGES];
01808
01809 } SAMPLE;
01810
01811
01812 typedef struct _DIG_DRIVER
01813 {
01814 char tag[4];
01815
01816 HTIMER backgroundtimer;
01817
01818 S32 quiet;
01819
01820 S32 n_active_samples;
01821
01822 S32 master_volume;
01823
01824 S32 DMA_rate;
01825 S32 hw_format;
01826 U32 hw_mode_flags;
01827
01828 S32 channels_per_sample;
01829 S32 bytes_per_channel;
01830 S32 channels_per_buffer;
01831 S32 samples_per_buffer;
01832
01833 S32 playing;
01834
01835 HSAMPLE samples;
01836 S32 n_samples;
01837
01838 S32 build_size;
01839 S32 FAR *build_buffer;
01840
01841 S32 system_data[8];
01842
01843 S32 buffer_size;
01844
01845 #ifdef IS_WINDOWS
01846
01847
01848
01849
01850
01851 HWAVEOUT hWaveOut;
01852
01853 U32 reset_works;
01854 U32 request_reset;
01855
01856 LPWAVEHDR first;
01857 S32 n_buffers;
01858
01859 LPWAVEHDR volatile FAR *return_list;
01860 S32 volatile return_head;
01861 S32 volatile return_tail;
01862
01863
01864 U32 deviceid;
01865 PCMWAVEFORMAT wformat;
01866
01867
01868
01869
01870
01871 U32 guid;
01872 AILLPDIRECTSOUND pDS;
01873
01874
01875 S32 emulated_ds;
01876 AILLPDIRECTSOUNDBUFFER lppdsb;
01877
01878 U32 dsHwnd;
01879
01880 AILLPDIRECTSOUNDBUFFER FAR * lpbufflist;
01881 HSAMPLE FAR *samp_list;
01882 S32 FAR *sec_format;
01883 S32 max_buffs;
01884
01885
01886
01887
01888
01889 S32 released;
01890
01891 U32 foreground_timer;
01892
01893 HDIGDRIVER next;
01894 S32 callingCT;
01895 S32 callingDS;
01896
01897
01898
01899
01900
01901 S32 DS_initialized;
01902
01903 AILLPDIRECTSOUNDBUFFER DS_sec_buff;
01904 AILLPDIRECTSOUNDBUFFER DS_out_buff;
01905 S32 DS_buffer_size;
01906
01907 S32 DS_frag_cnt;
01908 S32 DS_frag_size;
01909 S32 DS_last_frag;
01910
01911 S32 DS_use_default_format;
01912
01913 #else
01914
01915
01916 void *DMA[2];
01917
01918
01919
01920 REALFAR DMA_seg;
01921 U32 DMA_sel;
01922 void *DMA_buf;
01923
01924 S16 *buffer_flag;
01925 S32 last_buffer;
01926
01927 AIL_DRIVER *drvr;
01928
01929 DIG_DDT *DDT;
01930 DIG_DST *DST;
01931
01932 #endif
01933
01934 S32 use_MMX;
01935
01936 void FAR *decode_buffer;
01937 S32 decode_buffer_size;
01938
01939 U32 us_count;
01940 U32 ms_count;
01941 U32 last_ms_polled;
01942 U32 last_percent;
01943
01944
01945
01946
01947 DPINFO pipeline[N_DIGDRV_STAGES];
01948 }
01949 DIG_DRIVER;
01950
01951
01952 typedef struct
01953 {
01954 S32 program [NUM_CHANS];
01955 S32 pitch_l [NUM_CHANS];
01956 S32 pitch_h [NUM_CHANS];
01957
01958 S32 c_lock [NUM_CHANS];
01959 S32 c_prot [NUM_CHANS];
01960 S32 c_mute [NUM_CHANS];
01961 S32 c_v_prot [NUM_CHANS];
01962 S32 bank [NUM_CHANS];
01963 S32 gm_bank_l [NUM_CHANS];
01964 S32 gm_bank_m [NUM_CHANS];
01965 S32 indirect [NUM_CHANS];
01966 S32 callback [NUM_CHANS];
01967
01968 S32 mod [NUM_CHANS];
01969 S32 vol [NUM_CHANS];
01970 S32 pan [NUM_CHANS];
01971 S32 exp [NUM_CHANS];
01972 S32 sus [NUM_CHANS];
01973 S32 reverb [NUM_CHANS];
01974 S32 chorus [NUM_CHANS];
01975
01976 S32 bend_range[NUM_CHANS];
01977
01978 S32 RPN_L [NUM_CHANS];
01979 S32 RPN_M [NUM_CHANS];
01980 }
01981 CTRL_LOG;
01982
01983 typedef struct _SEQUENCE
01984 {
01985 char tag[4];
01986
01987 HMDIDRIVER driver;
01988
01989 U32 status;
01990
01991 void FAR *TIMB;
01992 void FAR *RBRN;
01993 void FAR *EVNT;
01994
01995 U8 FAR *EVNT_ptr;
01996
01997 U8 FAR *ICA;
01998
01999 AILPREFIXCB prefix_callback;
02000 AILTRIGGERCB trigger_callback;
02001 AILBEATCB beat_callback;
02002 AILSEQUENCECB EOS;
02003
02004 S32 loop_count;
02005
02006 S32 interval_count;
02007 S32 interval_num;
02008
02009 S32 volume;
02010 S32 volume_target;
02011 S32 volume_accum;
02012 S32 volume_period;
02013
02014 S32 tempo_percent;
02015 S32 tempo_target;
02016 S32 tempo_accum;
02017 S32 tempo_period;
02018 S32 tempo_error;
02019
02020 S32 beat_count;
02021 S32 measure_count;
02022
02023 S32 time_numerator;
02024 S32 time_fraction;
02025 S32 beat_fraction;
02026 S32 time_per_beat;
02027
02028 void FAR *FOR_ptrs [FOR_NEST];
02029 S32 FOR_loop_count [FOR_NEST];
02030
02031 S32 chan_map [NUM_CHANS];
02032
02033 CTRL_LOG shadow;
02034
02035 S32 note_count;
02036
02037 S32 note_chan [MAX_NOTES];
02038 S32 note_num [MAX_NOTES];
02039 S32 note_time [MAX_NOTES];
02040
02041 S32 user_data [8];
02042 S32 system_data[8];
02043
02044 #ifdef IS_WINDOWS
02045 S32 PREFIX_IsWin32s;
02046 S32 TRIGGER_IsWin32s;
02047 S32 BEAT_IsWin32s;
02048 S32 EOS_IsWin32s;
02049 #endif
02050 } SEQUENCE;
02051
02052 typedef struct _MDI_DRIVER
02053 {
02054 char tag[4];
02055
02056 HTIMER timer;
02057 S32 interval_time;
02058
02059 S32 disable;
02060
02061 HSEQUENCE sequences;
02062 S32 n_sequences;
02063
02064 S32 lock [NUM_CHANS];
02065 HSEQUENCE locker[NUM_CHANS];
02066 HSEQUENCE owner [NUM_CHANS];
02067 HSEQUENCE user [NUM_CHANS];
02068 S32 state [NUM_CHANS];
02069
02070 S32 notes [NUM_CHANS];
02071
02072 AILEVENTCB event_trap;
02073 AILTIMBRECB timbre_trap;
02074
02075 S32 master_volume;
02076
02077 S32 system_data[8];
02078
02079 #ifdef IS_WINDOWS
02080
02081 S32 EVENT_IsWin32s;
02082 S32 TIMBRE_IsWin32s;
02083
02084 MIDIHDR FAR *mhdr;
02085 U8 FAR *sysdata;
02086
02087 HMDIDRIVER next;
02088 S32 callingCT;
02089 S32 callingDS;
02090
02091 HMIDIOUT hMidiOut;
02092 U32 deviceid;
02093 S32 released;
02094
02095 #else
02096
02097 S32 message_count;
02098 S32 offset;
02099
02100 AIL_DRIVER *drvr;
02101
02102 MDI_DDT *DDT;
02103 MDI_DST *DST;
02104
02105 #endif
02106 }
02107 MDI_DRIVER;
02108
02109 typedef struct
02110 {
02111 S8 name[4];
02112
02113 U8 msb;
02114 U8 lsb;
02115 U8 lsb2;
02116 U8 lsb3;
02117
02118 U16 n_entries;
02119
02120 U16 timbre[1];
02121 }
02122 TIMB_chunk;
02123
02124 typedef struct
02125 {
02126 S16 bnum;
02127 U32 offset;
02128 }
02129 RBRN_entry;
02130
02131 typedef struct
02132 {
02133 S32 bank;
02134 S32 patch;
02135
02136 S32 root_key;
02137
02138 U32 file_offset;
02139 U32 size;
02140
02141 S32 format;
02142 U32 flags;
02143 S32 playback_rate;
02144 }
02145 WAVE_ENTRY;
02146
02147 typedef struct
02148 {
02149 HMDIDRIVER mdi;
02150 HDIGDRIVER dig;
02151
02152 WAVE_ENTRY FAR *library;
02153
02154 AILEVENTCB prev_event_fn;
02155 AILTIMBRECB prev_timb_fn;
02156
02157 CTRL_LOG controls;
02158
02159 WAVE_ENTRY FAR *wave [NUM_CHANS];
02160
02161 HSAMPLE S [MAX_W_VOICES];
02162 S32 n_voices;
02163
02164 S32 chan [MAX_W_VOICES];
02165 S32 note [MAX_W_VOICES];
02166 S32 root [MAX_W_VOICES];
02167 S32 rate [MAX_W_VOICES];
02168 S32 vel [MAX_W_VOICES];
02169 U32 time [MAX_W_VOICES];
02170
02171 U32 event;
02172 }
02173 WAVE_SYNTH;
02174
02175 typedef WAVE_SYNTH FAR * HWAVESYNTH;
02176
02177
02178
02179
02180
02181
02182
02183
02184 #ifdef IS_WIN32
02185
02186 extern HANDLE hAppThread;
02187
02188 #endif
02189
02190
02191
02192
02193
02194 extern volatile S32 AIL_bkgnd_flag;
02195
02196
02197
02198
02199
02200 extern S32 AIL_preference [N_PREFS];
02201
02202
02203
02204
02205
02206 extern HDIGDRIVER DIG_first;
02207
02208
02209
02210
02211
02212 extern HMDIDRIVER MDI_first;
02213
02214
02215
02216
02217
02218 #define FILE_READ_WITH_SIZE ((void FAR*)(S32)-1)
02219
02220 #ifndef NO_OLD_SYS_FUNCTIONS
02221
02222 #define MEM_alloc_lock AIL_mem_alloc_lock
02223 #define MEM_free_lock AIL_mem_free_lock
02224 #define FILE_error AIL_file_error
02225 #define FILE_size AIL_file_size
02226 #define FILE_read AIL_file_read
02227 #define FILE_write AIL_file_write
02228
02229 #ifdef IS_DOS
02230
02231 #define MEM_alloc AIL_mem_alloc
02232 #define MEM_free AIL_mem_free
02233 #define MEM_use_malloc AIL_mem_use_malloc
02234 #define MEM_use_free AIL_mem_use_free
02235 #define MEM_alloc_DOS AIL_mem_alloc_DOS
02236 #define MEM_free_DOS AIL_mem_free_DOS
02237 #define VMM_lock_range AIL_vmm_lock_range
02238 #define VMM_unlock_range AIL_vmm_unlock_range
02239 #define VMM_lock AIL_vmm_lock
02240 #define VMM_unlock AIL_vmm_unlock
02241
02242 #endif
02243
02244 #endif
02245
02246 extern S32 AILCALLBACK DP_ASI_DECODER_callback(U32 user,
02247 void FAR *dest,
02248 S32 bytes_requested,
02249 S32 offset);
02250
02251 DXDEC void FAR * AILCALL AIL_mem_alloc_lock(U32 size);
02252 DXDEC void AILCALL AIL_mem_free_lock (void FAR *ptr);
02253
02254 DXDEC S32 AILCALL AIL_file_error (void);
02255
02256 DXDEC S32 AILCALL AIL_file_size (char FAR *filename);
02257
02258 DXDEC void FAR * AILCALL AIL_file_read (char FAR *filename,
02259 void FAR *dest);
02260
02261 DXDEC S32 AILCALL AIL_file_write (char FAR *filename,
02262 void FAR *buf,
02263 U32 len);
02264
02265 DXDEC S32 AILCALL AIL_WAV_file_write
02266 (char FAR *filename,
02267 void FAR *buf,
02268 U32 len,
02269 S32 rate,
02270 S32 format);
02271
02272 DXDEC S32 AILCALL AIL_file_append (char FAR*filename,
02273 void FAR*buf, U32 len);
02274 #ifdef IS_DOS
02275
02276 extern void * AILCALLBACK (*AIL_mem_alloc) (U32);
02277 extern void AILCALLBACK (*AIL_mem_free) (void *);
02278
02279 void * cdecl AIL_mem_use_malloc(void * AILCALLBACK (*fn)(U32));
02280 void * cdecl AIL_mem_use_free (void AILCALLBACK (*fn)(void *));
02281
02282
02283
02284
02285
02286 DXDEC S32 AILCALL AIL_mem_alloc_DOS (U32 n_paras,
02287 void **protected_ptr,
02288 U32 *segment_far_ptr,
02289 U32 *selector);
02290
02291 DXDEC void AILCALL AIL_mem_free_DOS (void *protected_ptr,
02292 U32 segment_far_ptr,
02293 U32 selector);
02294
02295 DXDEC S32 AILCALL AIL_vmm_lock_range (void *p1, void *p2);
02296 DXDEC S32 AILCALL AIL_vmm_unlock_range (void *p1, void *p2);
02297
02298 DXDEC S32 AILCALL AIL_vmm_lock (void *start, U32 size);
02299 DXDEC S32 AILCALL AIL_vmm_unlock (void *start, U32 size);
02300
02301 DXDEC U32 AILCALL AIL_sel_base (U32 sel);
02302
02303 DXDEC void AILCALL AIL_sel_set_limit (U32 sel,
02304 U32 limit);
02305
02306
02307
02308
02309 extern IO_PARMS AIL_last_IO_attempt;
02310
02311
02312
02313
02314
02315 DXDEC REALFAR AILCALL AIL_get_real_vect (U32 vectnum);
02316
02317 DXDEC void AILCALL AIL_set_real_vect (U32 vectnum,
02318 REALFAR real_ptr);
02319
02320 DXDEC void AILCALL AIL_set_USE16_ISR (S32 IRQ,
02321 REALFAR real_base,
02322 U32 ISR_offset);
02323
02324 DXDEC void AILCALL AIL_restore_USE16_ISR (S32 IRQ);
02325
02326 DXDEC U32 AILCALL AIL_disable_interrupts (void);
02327 DXDEC void AILCALL AIL_restore_interrupts (U32 FD_register);
02328
02329 DXDEC void AILCALL AIL_switch_stack (void *stack,
02330 U32 size,
02331 U32 *SS,
02332 void **ESP,
02333 void **EBP);
02334
02335 DXDEC void AILCALL AIL_restore_stack (U32 SS,
02336 void *ESP,
02337 void *EBP);
02338
02339 DXDEC S32 AILCALL AIL_call_driver (AIL_DRIVER *drvr,
02340 S32 fn,
02341 VDI_CALL *in,
02342 VDI_CALL *out);
02343
02344 DXDEC S32 AILCALL AIL_read_INI (AIL_INI *INI,
02345 char *filename);
02346
02347 DXDEC U32 AILCALL AIL_interrupt_divisor (void);
02348
02349 #endif
02350
02351
02352 #ifdef __WATCOMC__
02353
02354 void MSSBreakPoint();
02355 #pragma aux MSSBreakPoint = "int 3";
02356
02357 #else
02358
02359 #define MSSBreakPoint() __asm {int 3}
02360
02361 #endif
02362
02363
02364
02365
02366
02367
02368 #ifdef IS_DOS
02369
02370 #ifdef IS_WATCOM
02371
02372 #if !defined(max) // Watcom stdlib.h doesn't define these for C++
02373 #define max(a,b) (((a) > (b)) ? (a) : (b))
02374 #endif
02375 #if !defined(min)
02376 #define min(a,b) (((a) < (b)) ? (a) : (b))
02377 #endif
02378
02379 #endif
02380
02381 #ifdef __SW_3R
02382 extern S32 AILCALL AIL_startup_reg (void);
02383 #define AIL_startup AIL_startup_reg
02384 #else
02385 extern S32 AILCALL AIL_startup_stack (void);
02386 #define AIL_startup AIL_startup_stack
02387 #endif
02388
02389 #define AIL_quick_startup(ud,um,opr,opb,ops) AIL_quick_startup_with_start(&AIL_startup,ud,um,opr,opb,ops)
02390
02391 extern S8 AIL_driver_directory [256];
02392
02393 DXDEC char FAR* AILCALL AIL_set_driver_directory (char FAR*dir);
02394
02395 #define AIL_get_preference(number) (AIL_preference[number])
02396
02397 #else
02398
02399 DXDEC S32 AILCALL AIL_startup (void);
02400
02401 DXDEC S32 AILCALL AIL_get_preference (U32 number);
02402
02403 #endif
02404
02405 DXDEC void AILCALL AIL_shutdown (void);
02406
02407 DXDEC S32 AILCALL AIL_set_preference (U32 number,
02408 S32 value);
02409
02410 DXDEC char FAR *AILCALL AIL_last_error (void);
02411
02412 DXDEC void AILCALL AIL_set_error (char FAR* error_msg);
02413
02414
02415
02416
02417
02418 DXDEC void __cdecl AIL_debug_printf (C8 FAR *fmt, ...);
02419 DXDEC U32 AILCALL AIL_MMX_available (void);
02420
02421 DXDEC void AILCALL AIL_lock (void);
02422 DXDEC void AILCALL AIL_unlock (void);
02423
02424 DXDEC void AILCALL AIL_delay (S32 intervals);
02425
02426 DXDEC S32 AILCALL AIL_background (void);
02427
02428
02429
02430
02431
02432 DXDEC HTIMER AILCALL AIL_register_timer (AILTIMERCB fn);
02433
02434 DXDEC U32 AILCALL AIL_set_timer_user (HTIMER timer,
02435 U32 user);
02436
02437 DXDEC void AILCALL AIL_set_timer_period (HTIMER timer,
02438 U32 microseconds);
02439
02440 DXDEC void AILCALL AIL_set_timer_frequency (HTIMER timer,
02441 U32 hertz);
02442
02443 DXDEC void AILCALL AIL_set_timer_divisor (HTIMER timer,
02444 U32 PIT_divisor);
02445
02446 DXDEC void AILCALL AIL_start_timer (HTIMER timer);
02447 DXDEC void AILCALL AIL_start_all_timers (void);
02448
02449 DXDEC void AILCALL AIL_stop_timer (HTIMER timer);
02450 DXDEC void AILCALL AIL_stop_all_timers (void);
02451
02452 DXDEC void AILCALL AIL_release_timer_handle (HTIMER timer);
02453 DXDEC void AILCALL AIL_release_all_timers (void);
02454
02455 #ifdef IS_WIN32
02456
02457 DXDEC HWND AILCALL AIL_HWND (void);
02458
02459 #endif
02460
02461
02462
02463
02464
02465 #ifdef IS_WINDOWS
02466
02467 #define AIL_DLL_version(str,len) \
02468 { \
02469 HINSTANCE l=LoadLibrary(MSSDLLNAME); \
02470 if ((U32)l<=32) \
02471 *(str)=0; \
02472 else { \
02473 LoadString(l,1,str,len); \
02474 FreeLibrary(l); \
02475 } \
02476 }
02477
02478 DXDEC S32 AILCALL AIL_waveOutOpen (HDIGDRIVER FAR *drvr,
02479 LPHWAVEOUT FAR *lphWaveOut,
02480 S32 wDeviceID,
02481 LPWAVEFORMAT lpFormat);
02482
02483 DXDEC void AILCALL AIL_waveOutClose (HDIGDRIVER drvr);
02484
02485 DXDEC S32 AILCALL AIL_digital_handle_release(HDIGDRIVER drvr);
02486
02487 DXDEC S32 AILCALL AIL_digital_handle_reacquire
02488 (HDIGDRIVER drvr);
02489
02490 DXDEC void AILCALL AIL_serve(void);
02491
02492 #else
02493
02494
02495
02496
02497
02498 DXDEC IO_PARMS * AILCALL AIL_get_IO_environment (AIL_DRIVER *drvr);
02499
02500 DXDEC AIL_DRIVER* AILCALL AIL_install_driver (U8 *driver_image,
02501 U32 n_bytes);
02502
02503 DXDEC void AILCALL AIL_uninstall_driver (AIL_DRIVER *drvr);
02504
02505 DXDEC S32 AILCALL AIL_install_DIG_INI (HDIGDRIVER *dig);
02506
02507 DXDEC HDIGDRIVER AILCALL AIL_install_DIG_driver_file
02508 (char *filename,
02509 IO_PARMS *IO);
02510
02511 DXDEC void AILCALL AIL_uninstall_DIG_driver (HDIGDRIVER dig);
02512
02513
02514 DXDEC HDIGDRIVER AILCALL AIL_install_DIG_driver_image
02515 (void *driver_image,
02516 U32 size,
02517 IO_PARMS *IO);
02518 #endif
02519
02520 DXDEC S32 AILCALL AIL_digital_CPU_percent(HDIGDRIVER dig);
02521
02522 DXDEC HSAMPLE AILCALL AIL_allocate_sample_handle
02523 (HDIGDRIVER dig);
02524
02525 DXDEC HSAMPLE AILCALL AIL_allocate_file_sample (HDIGDRIVER dig,
02526 void FAR *file_image,
02527 S32 block);
02528
02529 DXDEC void AILCALL AIL_release_sample_handle (HSAMPLE S);
02530
02531 DXDEC void AILCALL AIL_init_sample (HSAMPLE S);
02532
02533 DXDEC S32 AILCALL AIL_set_sample_file (HSAMPLE S,
02534 void FAR *file_image,
02535 S32 block);
02536
02537 DXDEC S32 AILCALL AIL_set_named_sample_file (HSAMPLE S,
02538 C8 FAR *file_type_suffix,
02539 void FAR *file_image,
02540 S32 file_size,
02541 S32 block);
02542
02543 DXDEC HPROVIDER AILCALL AIL_set_sample_processor (HSAMPLE S,
02544 SAMPLESTAGE pipeline_stage,
02545 HPROVIDER provider);
02546
02547 DXDEC HPROVIDER AILCALL AIL_set_digital_driver_processor
02548 (HDIGDRIVER dig,
02549 DIGDRVSTAGE pipeline_stage,
02550 HPROVIDER provider);
02551
02552 DXDEC void AILCALL AIL_set_sample_adpcm_block_size
02553 (HSAMPLE S,
02554 U32 blocksize);
02555
02556 DXDEC void AILCALL AIL_set_sample_address (HSAMPLE S,
02557 void FAR *start,
02558 U32 len);
02559
02560 DXDEC void AILCALL AIL_set_sample_type (HSAMPLE S,
02561 S32 format,
02562 U32 flags);
02563
02564 DXDEC void AILCALL AIL_start_sample (HSAMPLE S);
02565
02566 DXDEC void AILCALL AIL_stop_sample (HSAMPLE S);
02567
02568 DXDEC void AILCALL AIL_resume_sample (HSAMPLE S);
02569
02570 DXDEC void AILCALL AIL_end_sample (HSAMPLE S);
02571
02572 DXDEC void AILCALL AIL_set_sample_playback_rate
02573 (HSAMPLE S,
02574 S32 playback_rate);
02575
02576 DXDEC void AILCALL AIL_set_sample_volume (HSAMPLE S,
02577 S32 volume);
02578
02579 DXDEC void AILCALL AIL_set_sample_pan (HSAMPLE S,
02580 S32 pan);
02581
02582 DXDEC void AILCALL AIL_set_sample_loop_count (HSAMPLE S,
02583 S32 loop_count);
02584
02585 DXDEC void AILCALL AIL_set_sample_loop_block (HSAMPLE S,
02586 S32 loop_start_offset,
02587 S32 loop_end_offset);
02588
02589 DXDEC U32 AILCALL AIL_sample_status (HSAMPLE S);
02590
02591 DXDEC S32 AILCALL AIL_sample_playback_rate (HSAMPLE S);
02592
02593 DXDEC S32 AILCALL AIL_sample_volume (HSAMPLE S);
02594
02595 DXDEC S32 AILCALL AIL_sample_pan (HSAMPLE S);
02596
02597 DXDEC S32 AILCALL AIL_sample_loop_count (HSAMPLE S);
02598
02599 DXDEC void AILCALL AIL_set_digital_master_volume
02600 (HDIGDRIVER dig,
02601 S32 master_volume);
02602
02603 DXDEC S32 AILCALL AIL_digital_master_volume (HDIGDRIVER dig);
02604
02605
02606
02607
02608
02609 DXDEC S32 AILCALL AIL_minimum_sample_buffer_size(HDIGDRIVER dig,
02610 S32 playback_rate,
02611 S32 format);
02612
02613 DXDEC S32 AILCALL AIL_sample_buffer_ready (HSAMPLE S);
02614
02615 DXDEC void AILCALL AIL_load_sample_buffer (HSAMPLE S,
02616 U32 buff_num,
02617 void FAR *buffer,
02618 U32 len);
02619
02620 DXDEC S32 AILCALL AIL_sample_buffer_info (HSAMPLE S,
02621 U32 FAR *pos0,
02622 U32 FAR *len0,
02623 U32 FAR *pos1,
02624 U32 FAR *len1);
02625
02626 DXDEC U32 AILCALL AIL_sample_granularity (HSAMPLE S);
02627
02628 DXDEC void AILCALL AIL_set_sample_position (HSAMPLE S,
02629 U32 pos);
02630
02631 DXDEC U32 AILCALL AIL_sample_position (HSAMPLE S);
02632
02633 DXDEC AILSAMPLECB AILCALL AIL_register_SOB_callback
02634 (HSAMPLE S,
02635 AILSAMPLECB SOB);
02636
02637 DXDEC AILSAMPLECB AILCALL AIL_register_EOB_callback
02638 (HSAMPLE S,
02639 AILSAMPLECB EOB);
02640
02641 DXDEC AILSAMPLECB AILCALL AIL_register_EOS_callback
02642 (HSAMPLE S,
02643 AILSAMPLECB EOS);
02644
02645 DXDEC AILSAMPLECB AILCALL AIL_register_EOF_callback
02646 (HSAMPLE S,
02647 AILSAMPLECB EOFILE);
02648
02649 DXDEC void AILCALL AIL_set_sample_user_data (HSAMPLE S,
02650 U32 index,
02651 S32 value);
02652
02653 DXDEC S32 AILCALL AIL_sample_user_data (HSAMPLE S,
02654 U32 index);
02655
02656 DXDEC S32 AILCALL AIL_active_sample_count (HDIGDRIVER dig);
02657
02658 DXDEC void AILCALL AIL_digital_configuration (HDIGDRIVER dig,
02659 S32 FAR *rate,
02660 S32 FAR *format,
02661 char FAR *string);
02662 #ifdef IS_WIN32
02663
02664 DXDEC S32 AILCALL AIL_set_direct_buffer_control (HSAMPLE S,
02665 U32 command);
02666
02667 DXDEC void AILCALL AIL_get_DirectSound_info (HSAMPLE S,
02668 AILLPDIRECTSOUND *lplpDS,
02669 AILLPDIRECTSOUNDBUFFER *lplpDSB);
02670
02671 DXDEC S32 AILCALL AIL_set_DirectSound_HWND(HDIGDRIVER dig, HWND wnd);
02672
02673 #endif
02674
02675 DXDEC void AILCALL AIL_set_sample_ms_position (HSAMPLE S,
02676 S32 milliseconds);
02677
02678 DXDEC void AILCALL AIL_sample_ms_position (HSAMPLE S,
02679 S32 FAR * total_milliseconds,
02680 S32 FAR * current_milliseconds);
02681
02682
02683
02684
02685
02686
02687 #ifdef IS_WINDOWS
02688
02689 DXDEC S32 AILCALL AIL_midiOutOpen(HMDIDRIVER FAR *drvr,
02690 LPHMIDIOUT FAR *lphMidiOut,
02691 S32 dwDeviceID);
02692
02693 DXDEC void AILCALL AIL_midiOutClose (HMDIDRIVER mdi);
02694
02695 DXDEC S32 AILCALL AIL_MIDI_handle_release
02696 (HMDIDRIVER mdi);
02697
02698 DXDEC S32 AILCALL AIL_MIDI_handle_reacquire
02699 (HMDIDRIVER mdi);
02700
02701 #else
02702
02703 DXDEC S32 AILCALL AIL_install_MDI_INI (HMDIDRIVER *mdi);
02704
02705 DXDEC HMDIDRIVER AILCALL AIL_install_MDI_driver_file
02706 (char *filename,
02707 IO_PARMS *IO);
02708
02709 DXDEC void AILCALL AIL_uninstall_MDI_driver (HMDIDRIVER mdi);
02710
02711
02712 DXDEC HMDIDRIVER AILCALL AIL_install_MDI_driver_image
02713 (void *driver_image,
02714 U32 size,
02715 IO_PARMS *IO);
02716
02717 DXDEC S32 AILCALL AIL_MDI_driver_type (HMDIDRIVER mdi);
02718
02719 DXDEC void AILCALL AIL_set_GTL_filename_prefix (char *prefix);
02720
02721 DXDEC S32 AILCALL AIL_timbre_status (HMDIDRIVER mdi,
02722 S32 bank,
02723 S32 patch);
02724
02725 DXDEC S32 AILCALL AIL_install_timbre (HMDIDRIVER mdi,
02726 S32 bank,
02727 S32 patch);
02728
02729 DXDEC void AILCALL AIL_protect_timbre (HMDIDRIVER mdi,
02730 S32 bank,
02731 S32 patch);
02732
02733 DXDEC void AILCALL AIL_unprotect_timbre (HMDIDRIVER mdi,
02734 S32 bank,
02735 S32 patch);
02736
02737 #endif
02738
02739 DXDEC HSEQUENCE AILCALL AIL_allocate_sequence_handle
02740 (HMDIDRIVER mdi);
02741
02742 DXDEC void AILCALL AIL_release_sequence_handle
02743 (HSEQUENCE S);
02744
02745 DXDEC S32 AILCALL AIL_init_sequence (HSEQUENCE S,
02746 void FAR *start,
02747 S32 sequence_num);
02748
02749 DXDEC void AILCALL AIL_start_sequence (HSEQUENCE S);
02750
02751 DXDEC void AILCALL AIL_stop_sequence (HSEQUENCE S);
02752
02753 DXDEC void AILCALL AIL_resume_sequence (HSEQUENCE S);
02754
02755 DXDEC void AILCALL AIL_end_sequence (HSEQUENCE S);
02756
02757 DXDEC void AILCALL AIL_set_sequence_tempo (HSEQUENCE S,
02758 S32 tempo,
02759 S32 milliseconds);
02760
02761 DXDEC void AILCALL AIL_set_sequence_volume (HSEQUENCE S,
02762 S32 volume,
02763 S32 milliseconds);
02764
02765 DXDEC void AILCALL AIL_set_sequence_loop_count
02766 (HSEQUENCE S,
02767 S32 loop_count);
02768
02769 DXDEC U32 AILCALL AIL_sequence_status (HSEQUENCE S);
02770
02771 DXDEC S32 AILCALL AIL_sequence_tempo (HSEQUENCE S);
02772
02773 DXDEC S32 AILCALL AIL_sequence_volume (HSEQUENCE S);
02774
02775 DXDEC S32 AILCALL AIL_sequence_loop_count (HSEQUENCE S);
02776
02777 DXDEC void AILCALL AIL_set_XMIDI_master_volume
02778 (HMDIDRIVER mdi,
02779 S32 master_volume);
02780
02781 DXDEC S32 AILCALL AIL_XMIDI_master_volume (HMDIDRIVER mdi);
02782
02783
02784
02785
02786
02787
02788 DXDEC S32 AILCALL AIL_active_sequence_count (HMDIDRIVER mdi);
02789
02790 DXDEC S32 AILCALL AIL_controller_value (HSEQUENCE S,
02791 S32 channel,
02792 S32 controller_num);
02793
02794 DXDEC S32 AILCALL AIL_channel_notes (HSEQUENCE S,
02795 S32 channel);
02796
02797 DXDEC void AILCALL AIL_sequence_position (HSEQUENCE S,
02798 S32 FAR *beat,
02799 S32 FAR *measure);
02800
02801 DXDEC void AILCALL AIL_branch_index (HSEQUENCE S,
02802 U32 marker);
02803
02804 DXDEC AILPREFIXCB AILCALL AIL_register_prefix_callback
02805 (HSEQUENCE S,
02806 AILPREFIXCB callback);
02807
02808 DXDEC AILTRIGGERCB AILCALL AIL_register_trigger_callback
02809 (HSEQUENCE S,
02810 AILTRIGGERCB callback);
02811
02812 DXDEC AILSEQUENCECB AILCALL AIL_register_sequence_callback
02813 (HSEQUENCE S,
02814 AILSEQUENCECB callback);
02815
02816 DXDEC AILBEATCB AILCALL AIL_register_beat_callback (HSEQUENCE S,
02817 AILBEATCB callback);
02818
02819 DXDEC AILEVENTCB AILCALL AIL_register_event_callback (HMDIDRIVER mdi,
02820 AILEVENTCB callback);
02821
02822 DXDEC AILTIMBRECB AILCALL AIL_register_timbre_callback
02823 (HMDIDRIVER mdi,
02824 AILTIMBRECB callback);
02825
02826 DXDEC void AILCALL AIL_set_sequence_user_data (HSEQUENCE S,
02827 U32 index,
02828 S32 value);
02829
02830 DXDEC S32 AILCALL AIL_sequence_user_data (HSEQUENCE S,
02831 U32 index);
02832
02833 DXDEC void AILCALL AIL_register_ICA_array (HSEQUENCE S,
02834 U8 FAR *array);
02835
02836 DXDEC S32 AILCALL AIL_lock_channel (HMDIDRIVER mdi);
02837
02838 DXDEC void AILCALL AIL_release_channel (HMDIDRIVER mdi,
02839 S32 channel);
02840
02841 DXDEC void AILCALL AIL_map_sequence_channel (HSEQUENCE S,
02842 S32 seq_channel,
02843 S32 new_channel);
02844
02845 DXDEC S32 AILCALL AIL_true_sequence_channel (HSEQUENCE S,
02846 S32 seq_channel);
02847
02848 DXDEC void AILCALL AIL_send_channel_voice_message
02849 (HMDIDRIVER mdi,
02850 HSEQUENCE S,
02851 S32 status,
02852 S32 data_1,
02853 S32 data_2);
02854
02855 DXDEC void AILCALL AIL_send_sysex_message (HMDIDRIVER mdi,
02856 void FAR *buffer);
02857
02858 DXDEC HWAVESYNTH
02859 AILCALL AIL_create_wave_synthesizer (HDIGDRIVER dig,
02860 HMDIDRIVER mdi,
02861 void FAR *wave_lib,
02862 S32 polyphony);
02863
02864 DXDEC void AILCALL AIL_destroy_wave_synthesizer (HWAVESYNTH W);
02865
02866 DXDEC void AILCALL AIL_set_sequence_ms_position (HSEQUENCE S,
02867 S32 milliseconds);
02868
02869 DXDEC void AILCALL AIL_sequence_ms_position(HSEQUENCE S,
02870 S32 FAR *total_milliseconds,
02871 S32 FAR *current_milliseconds);
02872
02873
02874
02875
02876
02877
02878
02879 #ifdef IS_DOS
02880 typedef struct _REDBOOKTRACKINFO {
02881 U32 tracks;
02882 U32 trackstarts[100];
02883 } REDBOOKTRACKINFO;
02884 #endif
02885
02886 typedef struct _REDBOOK {
02887 U32 DeviceID;
02888 U32 paused;
02889 U32 pausedsec;
02890 U32 lastendsec;
02891 #ifdef IS_DOS
02892 U32 readcontents;
02893 REDBOOKTRACKINFO info;
02894 #endif
02895 } REDBOOK;
02896
02897 typedef struct _REDBOOK FAR* HREDBOOK;
02898
02899 #define REDBOOK_ERROR 0
02900 #define REDBOOK_PLAYING 1
02901 #define REDBOOK_PAUSED 2
02902 #define REDBOOK_STOPPED 3
02903
02904
02905 DXDEC HREDBOOK AILCALL AIL_redbook_open(U32 which);
02906
02907 DXDEC HREDBOOK AILCALL AIL_redbook_open_drive(S32 drive);
02908
02909 DXDEC void AILCALL AIL_redbook_close(HREDBOOK hand);
02910
02911 DXDEC void AILCALL AIL_redbook_eject(HREDBOOK hand);
02912
02913 DXDEC void AILCALL AIL_redbook_retract(HREDBOOK hand);
02914
02915 DXDEC U32 AILCALL AIL_redbook_status(HREDBOOK hand);
02916
02917 DXDEC U32 AILCALL AIL_redbook_tracks(HREDBOOK hand);
02918
02919 DXDEC U32 AILCALL AIL_redbook_track(HREDBOOK hand);
02920
02921 DXDEC void AILCALL AIL_redbook_track_info(HREDBOOK hand,U32 tracknum,
02922 U32 FAR* startmsec,U32 FAR* endmsec);
02923
02924 DXDEC U32 AILCALL AIL_redbook_id(HREDBOOK hand);
02925
02926 DXDEC U32 AILCALL AIL_redbook_position(HREDBOOK hand);
02927
02928 DXDEC U32 AILCALL AIL_redbook_play(HREDBOOK hand,U32 startmsec, U32 endmsec);
02929
02930 DXDEC U32 AILCALL AIL_redbook_stop(HREDBOOK hand);
02931
02932 DXDEC U32 AILCALL AIL_redbook_pause(HREDBOOK hand);
02933
02934 DXDEC U32 AILCALL AIL_redbook_resume(HREDBOOK hand);
02935
02936 DXDEC S32 AILCALL AIL_redbook_volume(HREDBOOK hand);
02937
02938 DXDEC S32 AILCALL AIL_redbook_set_volume(HREDBOOK hand, S32 volume);
02939
02940 #ifdef IS_WIN16
02941 #define AIL_ms_count timeGetTime
02942 DXDEC U32 AILCALL AIL_us_count(void);
02943 #else
02944 DXDEC U32 AILCALL AIL_ms_count(void);
02945 DXDEC U32 AILCALL AIL_us_count(void);
02946 #endif
02947
02948
02949 typedef struct _STREAM FAR* HSTREAM;
02950
02951 typedef void (AILCALLBACK FAR* AILSTREAMCB) (HSTREAM stream);
02952
02953 typedef struct _STREAM {
02954
02955 S32 block_oriented;
02956 S32 using_ASI;
02957 ASISTAGE FAR *ASI;
02958
02959 HSAMPLE samp;
02960
02961 U32 fileh;
02962
02963 U8 FAR* bufs[3];
02964 U32 bufsizes[3];
02965
02966 S32 bufsize;
02967 S32 readsize;
02968
02969 U32 buf1;
02970 S32 size1;
02971
02972 U32 buf2;
02973 S32 size2;
02974
02975 U32 buf3;
02976 S32 size3;
02977
02978 U32 datarate;
02979 S32 filerate;
02980 S32 filetype;
02981 U32 fileflags;
02982 S32 totallen;
02983
02984 U32 blocksize;
02985 S32 padding;
02986 S32 padded;
02987
02988 S32 loadedsize;
02989 S32 loadedsome;
02990
02991 U32 startpos;
02992 U32 totalread;
02993
02994 U32 loopsleft;
02995
02996 U32 error;
02997
02998 S32 preload;
02999 S32 dontclose;
03000 S32 noback;
03001 S32 alldone;
03002 S32 primeamount;
03003 S32 readatleast;
03004
03005 S32 playcontrol;
03006
03007 AILSTREAMCB callback;
03008
03009 S32 user_data[8];
03010 void FAR* next;
03011
03012 #ifdef IS_WINDOWS
03013 S32 autostreaming;
03014 S32 cb_IsWin32s;
03015 #endif
03016
03017 S32 docallback;
03018
03019 } STREAM_TYPE;
03020
03021
03022 DXDEC HSTREAM AILCALL AIL_open_stream(HDIGDRIVER dig, char FAR* filename, S32 stream_mem);
03023
03024 DXDEC void AILCALL AIL_close_stream(HSTREAM stream);
03025
03026 DXDEC S32 AILCALL AIL_service_stream(HSTREAM stream, S32 fillup);
03027
03028 DXDEC void AILCALL AIL_start_stream(HSTREAM stream);
03029
03030 DXDEC void AILCALL AIL_pause_stream(HSTREAM stream, S32 onoff);
03031
03032 DXDEC void AILCALL AIL_set_stream_volume(HSTREAM stream,S32 volume);
03033
03034 DXDEC void AILCALL AIL_set_stream_pan(HSTREAM stream,S32 pan);
03035
03036 DXDEC S32 AILCALL AIL_stream_volume(HSTREAM stream);
03037
03038 DXDEC S32 AILCALL AIL_stream_pan(HSTREAM stream);
03039
03040 DXDEC void AILCALL AIL_set_stream_playback_rate(HSTREAM stream, S32 rate);
03041
03042 DXDEC S32 AILCALL AIL_stream_playback_rate(HSTREAM stream);
03043
03044 DXDEC S32 AILCALL AIL_stream_loop_count(HSTREAM stream);
03045
03046 DXDEC void AILCALL AIL_set_stream_loop_count(HSTREAM stream, S32 count);
03047
03048 DXDEC S32 AILCALL AIL_stream_status(HSTREAM stream);
03049
03050 DXDEC void AILCALL AIL_set_stream_position(HSTREAM stream,S32 offset);
03051
03052 DXDEC S32 AILCALL AIL_stream_position(HSTREAM stream);
03053
03054 DXDEC void AILCALL AIL_stream_info(HSTREAM stream, S32 FAR* datarate, S32 FAR* sndtype, S32 FAR* length, S32 FAR* memory);
03055
03056 DXDEC AILSTREAMCB AILCALL AIL_register_stream_callback(HSTREAM stream, AILSTREAMCB callback);
03057
03058 DXDEC void AILCALL AIL_auto_service_stream(HSTREAM stream, S32 onoff);
03059
03060 DXDEC void AILCALL AIL_set_stream_user_data (HSTREAM S,
03061 U32 index,
03062 S32 value);
03063
03064 DXDEC S32 AILCALL AIL_stream_user_data (HSTREAM S,
03065 U32 index);
03066
03067 DXDEC void AILCALL AIL_set_stream_ms_position (HSTREAM S,
03068 S32 milliseconds);
03069
03070 DXDEC void AILCALL AIL_stream_ms_position (HSTREAM S,
03071 S32 FAR * total_milliseconds,
03072 S32 FAR * current_milliseconds);
03073
03074
03075
03076
03077
03078 typedef struct _DLSFILEID {
03079 S32 id;
03080 struct _DLSFILEID FAR* next;
03081 } DLSFILEID;
03082
03083 typedef struct _DLSFILEID FAR* HDLSFILEID;
03084
03085 typedef struct _DLSDEVICE {
03086 void FAR* pGetPref;
03087 void FAR* pSetPref;
03088 void FAR* pMSSOpen;
03089 void FAR* pOpen;
03090 void FAR* pClose;
03091 void FAR* pLoadFile;
03092 void FAR* pLoadMem;
03093 void FAR* pUnloadFile;
03094 void FAR* pUnloadAll;
03095 void FAR* pGetInfo;
03096 void FAR* pCompact;
03097 void FAR* pSetAttr;
03098 S32 DLSHandle;
03099 U32 format;
03100 U32 buffer_size;
03101 void FAR* buffer[2];
03102 HSAMPLE sample;
03103 HMDIDRIVER mdi;
03104 HDIGDRIVER dig;
03105 HDLSFILEID first;
03106 #ifdef IS_WINDOWS
03107 HMODULE lib;
03108 #else
03109 char FAR* DOSname;
03110 #endif
03111 } DLSDEVICE;
03112
03113 typedef struct _DLSDEVICE FAR* HDLSDEVICE;
03114
03115 typedef struct _AILDLSINFO {
03116 char Description[128];
03117 S32 MaxDLSMemory;
03118 S32 CurrentDLSMemory;
03119 S32 LargestSize;
03120 S32 GMAvailable;
03121 S32 GMBankSize;
03122 } AILDLSINFO;
03123
03124 #ifdef IS_DOS
03125
03126 typedef struct _AILDOSDLS {
03127 char FAR* description;
03128 void FAR* pDLSOpen;
03129 void FAR* pMSSOpen;
03130 void FAR* pOpen;
03131 void FAR* pClose;
03132 void FAR* pLoadFile;
03133 void FAR* pLoadMem;
03134 void FAR* pUnloadFile;
03135 void FAR* pUnloadAll;
03136 void FAR* pGetInfo;
03137 void FAR* pCompact;
03138 void FAR* pSetAttr;
03139 } AILDOSDLS;
03140
03141 #endif
03142
03143
03144 DXDEC HDLSDEVICE AILCALL AIL_DLS_open(HMDIDRIVER mdi, HDIGDRIVER dig,
03145 #ifdef IS_WINDOWS
03146 char FAR* libname,
03147 #else
03148 AILDOSDLS FAR* dosdls,
03149 #endif
03150 U32 flags, U32 rate, S32 bits, S32 channels);
03151
03152
03153
03154
03155
03156 #define RETAIN_DLS_COLLECTION 0x00000001
03157 #define RETURN_TO_BOOTUP_STATE 0x00000002
03158 #define RETURN_TO_GM_ONLY_STATE 0x00000004
03159 #define DLS_COMPACT_MEMORY 0x00000008
03160
03161 DXDEC void AILCALL AIL_DLS_close(HDLSDEVICE dls, U32 flags);
03162
03163 DXDEC HDLSFILEID AILCALL AIL_DLS_load_file(HDLSDEVICE dls, char FAR* filename, U32 flags);
03164
03165 DXDEC HDLSFILEID AILCALL AIL_DLS_load_memory(HDLSDEVICE dls, void FAR* memfile, U32 flags);
03166
03167
03168
03169
03170
03171 #define AIL_DLS_UNLOAD_MINE 0
03172 #define AIL_DLS_UNLOAD_ALL ((HDLSFILEID)(U32)(S32)-1)
03173
03174 DXDEC void AILCALL AIL_DLS_unload(HDLSDEVICE dls, HDLSFILEID dlsid);
03175
03176 DXDEC void AILCALL AIL_DLS_compact(HDLSDEVICE dls);
03177
03178 DXDEC void AILCALL AIL_DLS_get_info(HDLSDEVICE dls, AILDLSINFO FAR* info, S32 FAR* PercentCPU);
03179
03180
03181
03182
03183
03184
03185 typedef struct
03186 {
03187 U32 FAR *data;
03188 S32 size;
03189 S32 type;
03190 void FAR *handle;
03191 S32 status;
03192 void FAR* next;
03193 S32 speed;
03194 S32 volume;
03195 S32 extravol;
03196 HDLSFILEID dlsid;
03197 void FAR* dlsmem;
03198 void FAR* dlsmemunc;
03199 S32 milliseconds;
03200 S32 length;
03201 S32 userdata;
03202 }
03203 AUDIO_TYPE;
03204
03205
03206 #define QSTAT_DONE 1 // Data has finished playing
03207 #define QSTAT_LOADED 2 // Data has been loaded, but not yet played
03208 #define QSTAT_PLAYING 3 // Data is currently playing
03209
03210 typedef AUDIO_TYPE FAR * HAUDIO;
03211
03212 #define AIL_QUICK_USE_WAVEOUT 2
03213 #define AIL_QUICK_MIDI_AND_DLS 2
03214 #define AIL_QUICK_DLS_ONLY 3
03215
03216 DXDEC S32 AILCALL
03217 #ifdef IS_WINDOWS
03218 AIL_quick_startup (
03219 #else
03220 AIL_quick_startup_with_start(void* startup,
03221 #endif
03222 S32 use_digital,
03223 S32 use_MIDI,
03224 U32 output_rate,
03225 S32 output_bits,
03226 S32 output_channels);
03227
03228 DXDEC void AILCALL AIL_quick_shutdown (void);
03229
03230 DXDEC void AILCALL AIL_quick_handles (HDIGDRIVER FAR* pdig,
03231 HMDIDRIVER FAR* pmdi,
03232 HDLSDEVICE FAR* pdls );
03233
03234 DXDEC HAUDIO AILCALL AIL_quick_load (char FAR *filename);
03235
03236 DXDEC HAUDIO AILCALL AIL_quick_load_mem (void FAR *mem,
03237 U32 size);
03238
03239 DXDEC HAUDIO AILCALL AIL_quick_copy (HAUDIO audio);
03240
03241 DXDEC void AILCALL AIL_quick_unload (HAUDIO audio);
03242
03243 DXDEC S32 AILCALL AIL_quick_play (HAUDIO audio,
03244 U32 loop_count);
03245
03246 DXDEC void AILCALL AIL_quick_halt (HAUDIO audio);
03247
03248 DXDEC S32 AILCALL AIL_quick_status (HAUDIO audio);
03249
03250 DXDEC HAUDIO AILCALL AIL_quick_load_and_play (char FAR *filename,
03251 U32 loop_count,
03252 S32 wait_request);
03253
03254 DXDEC void AILCALL AIL_quick_set_speed (HAUDIO audio, S32 speed);
03255
03256 DXDEC void AILCALL AIL_quick_set_volume (HAUDIO audio, S32 volume, S32 extravol);
03257
03258 DXDEC void AILCALL AIL_quick_set_ms_position(HAUDIO audio,S32 milliseconds);
03259
03260 DXDEC S32 AILCALL AIL_quick_ms_position(HAUDIO audio);
03261
03262 DXDEC S32 AILCALL AIL_quick_ms_length(HAUDIO audio);
03263
03264 #define AIL_QUICK_XMIDI_TYPE 1
03265 #define AIL_QUICK_DIGITAL_TYPE 2
03266 #define AIL_QUICK_DLS_XMIDI_TYPE 3
03267 #define AIL_QUICK_MPEG_DIGITAL_TYPE 4
03268
03269 DXDEC S32 AILCALL AIL_quick_type(HAUDIO audio);
03270
03271
03272
03273
03274
03275
03276 typedef struct _AILSOUNDINFO {
03277 S32 format;
03278 void FAR* data_ptr;
03279 U32 data_len;
03280 U32 rate;
03281 S32 bits;
03282 S32 channels;
03283 U32 samples;
03284 U32 block_size;
03285 void FAR* initial_ptr;
03286 } AILSOUNDINFO;
03287
03288
03289
03290
03291
03292 typedef struct _AILMIXINFO {
03293 AILSOUNDINFO Info;
03294 ADPCMDATA mss_adpcm;
03295 U32 src_fract;
03296 S32 left_val;
03297 S32 right_val;
03298 } AILMIXINFO;
03299
03300
03301
03302 DXDEC S32 AILCALL AIL_WAV_info(void FAR* data, AILSOUNDINFO FAR* info);
03303
03304 DXDEC S32 AILCALL AIL_size_processed_digital_audio(
03305 U32 dest_rate,
03306 U32 dest_format,
03307 S32 num_srcs,
03308 AILMIXINFO FAR* src);
03309
03310 DXDEC S32 AILCALL AIL_process_digital_audio(
03311 void FAR *dest_buffer,
03312 S32 dest_buffer_size,
03313 U32 dest_rate,
03314 U32 dest_format,
03315 S32 num_srcs,
03316 AILMIXINFO FAR* src);
03317
03318 #define AIL_LENGTHY_INIT 0
03319 #define AIL_LENGTHY_SET_PREFERENCE 1
03320 #define AIL_LENGTHY_UPDATE 2
03321 #define AIL_LENGTHY_DONE 3
03322
03323 typedef S32 (AILCALLBACK FAR* AILLENGTHYCB)(U32 state,U32 user);
03324
03325 typedef void (AILCALLBACK FAR* AILCODECSETPREF)(char FAR* preference,U32 value);
03326
03327 DXDEC S32 AILCALL AIL_compress_ASI(AILSOUNDINFO FAR* info,
03328 char FAR* filename_ext,
03329 void FAR* FAR* outdata,
03330 U32 FAR* outsize,
03331 AILLENGTHYCB callback);
03332
03333 DXDEC S32 AILCALL AIL_decompress_ASI(void FAR* indata,
03334 U32 insize,
03335 char FAR* filename_ext,
03336 void FAR* FAR* outdata,
03337 U32 FAR* outsize,
03338 AILLENGTHYCB callback);
03339
03340 DXDEC S32 AILCALL AIL_compress_ADPCM(AILSOUNDINFO FAR * info,
03341 void FAR* FAR* outdata, U32 FAR* outsize);
03342
03343 DXDEC S32 AILCALL AIL_decompress_ADPCM(AILSOUNDINFO FAR * info,
03344 void FAR* FAR* outdata, U32 FAR* outsize);
03345
03346 DXDEC S32 AILCALL AIL_compress_DLS(void FAR* dls,
03347 char FAR* compression_extension,
03348 void FAR* FAR* mls, U32 FAR* mlssize,
03349 AILLENGTHYCB callback);
03350
03351 DXDEC S32 AILCALL AIL_merge_DLS_with_XMI(void FAR* xmi, void FAR* dls,
03352 void FAR* FAR* mss, U32 FAR* msssize);
03353
03354 DXDEC S32 AILCALL AIL_extract_DLS( void FAR *source_image,
03355 S32 source_size,
03356 void FAR * FAR *XMI_output_data,
03357 S32 FAR *XMI_output_size,
03358 void FAR * FAR *DLS_output_data,
03359 S32 FAR *DLS_output_size,
03360 AILLENGTHYCB callback);
03361
03362 #define AILFILTERDLS_USINGLIST 1
03363
03364 DXDEC S32 AILCALL AIL_filter_DLS_with_XMI(void FAR* xmi, void FAR* dls,
03365 void FAR* FAR* dlsout, U32 FAR* dlssize,
03366 S32 flags, AILLENGTHYCB callback);
03367
03368 #define AILMIDITOXMI_USINGLIST 1
03369 #define AILMIDITOXMI_TOLERANT 2
03370
03371 DXDEC S32 AILCALL AIL_MIDI_to_XMI (void FAR* MIDI,
03372 U32 MIDI_size,
03373 void FAR* FAR*XMIDI,
03374 U32 FAR* XMIDI_size,
03375 S32 flags);
03376
03377 #define AILMIDILIST_ROLANDSYSEX 1
03378 #define AILMIDILIST_ROLANDUN 2
03379 #define AILMIDILIST_ROLANDAB 4
03380
03381 DXDEC S32 AILCALL AIL_list_MIDI (void FAR* MIDI,
03382 U32 MIDI_size,
03383 char FAR* FAR* lst,
03384 U32 FAR* lst_size,
03385 S32 flags);
03386 #define AILDLSLIST_ARTICULATION 1
03387 #define AILDLSLIST_DUMP_WAVS 2
03388
03389 DXDEC S32 AILCALL AIL_list_DLS (void FAR* DLS,
03390 char FAR* FAR* lst,
03391 U32 FAR* lst_size,
03392 S32 flags,
03393 C8 FAR* title);
03394
03395 #define AILFILETYPE_UNKNOWN 0
03396 #define AILFILETYPE_PCM_WAV 1
03397 #define AILFILETYPE_ADPCM_WAV 2
03398 #define AILFILETYPE_OTHER_WAV 3
03399 #define AILFILETYPE_VOC 4
03400 #define AILFILETYPE_MIDI 5
03401 #define AILFILETYPE_XMIDI 6
03402 #define AILFILETYPE_XMIDI_DLS 7
03403 #define AILFILETYPE_XMIDI_MLS 8
03404 #define AILFILETYPE_DLS 9
03405 #define AILFILETYPE_MLS 10
03406 #define AILFILETYPE_MPEG_L1_AUDIO 11
03407 #define AILFILETYPE_MPEG_L2_AUDIO 12
03408 #define AILFILETYPE_MPEG_L3_AUDIO 13
03409
03410 DXDEC S32 AILCALL AIL_file_type(void FAR* data, U32 size);
03411
03412 DXDEC S32 AILCALL AIL_find_DLS (void FAR* data, U32 size,
03413 void FAR* FAR* xmi, U32 FAR* xmisize,
03414 void FAR* FAR* dls, U32 FAR* dlssize);
03415
03416 #ifdef IS_WIN32
03417
03418
03419
03420
03421
03422 DXDEC S32 AILCALL AIL_enumerate_3D_providers (HPROENUM FAR *next,
03423 HPROVIDER FAR *dest,
03424 C8 FAR * FAR *name);
03425
03426 DXDEC M3DRESULT AILCALL AIL_open_3D_provider (HPROVIDER lib);
03427
03428 DXDEC void AILCALL AIL_close_3D_provider (HPROVIDER lib);
03429
03430 typedef struct _M3DPROVIDER
03431 {
03432 PROVIDER_QUERY_ATTRIBUTE PROVIDER_query_attribute;
03433 M3D_STARTUP startup;
03434 M3D_ERROR error;
03435 M3D_SHUTDOWN shutdown;
03436 M3D_SET_PROVIDER_PREFERENCE set_provider_preference;
03437 M3D_ACTIVATE activate;
03438 M3D_ALLOCATE_3D_SAMPLE_HANDLE allocate_3D_sample_handle;
03439 M3D_RELEASE_3D_SAMPLE_HANDLE release_3D_sample_handle;
03440 M3D_START_3D_SAMPLE start_3D_sample;
03441 M3D_STOP_3D_SAMPLE stop_3D_sample;
03442 M3D_RESUME_3D_SAMPLE resume_3D_sample;
03443 M3D_END_3D_SAMPLE end_3D_sample;
03444 M3D_SET_3D_SAMPLE_FILE set_3D_sample_file;
03445 M3D_SET_3D_SAMPLE_VOLUME set_3D_sample_volume;
03446 M3D_SET_3D_SAMPLE_OFFSET set_3D_sample_offset;
03447 M3D_SET_3D_SAMPLE_LOOP_COUNT set_3D_sample_loop_count;
03448 M3D_SET_3D_SAMPLE_LOOP_BLOCK set_3D_sample_loop_block;
03449 M3D_3D_SAMPLE_STATUS sample_status;
03450 M3D_3D_SAMPLE_VOLUME sample_volume;
03451 M3D_3D_SAMPLE_OFFSET sample_offset;
03452 M3D_3D_SAMPLE_LENGTH sample_length;
03453 M3D_3D_SAMPLE_LOOP_COUNT sample_loop_count;
03454 M3D_SET_3D_SAMPLE_DISTANCES set_3D_sample_distances;
03455 M3D_3D_SAMPLE_DISTANCES sample_distances;
03456 M3D_ACTIVE_3D_SAMPLE_COUNT active_3D_sample_count;
03457 M3D_3D_OPEN_LISTENER open_listener;
03458 M3D_3D_CLOSE_LISTENER close_listener;
03459 M3D_3D_OPEN_OBJECT open_object;
03460 M3D_3D_CLOSE_OBJECT close_object;
03461 M3D_SET_3D_POSITION set_3D_position;
03462 M3D_SET_3D_VELOCITY set_3D_velocity;
03463 M3D_SET_3D_VELOCITY_VECTOR set_3D_velocity_vector;
03464 M3D_SET_3D_ORIENTATION set_3D_orientation;
03465 M3D_3D_POSITION position;
03466 M3D_3D_VELOCITY velocity;
03467 M3D_3D_ORIENTATION orientation;
03468 M3D_3D_UPDATE_POSITION update_position;
03469 M3D_3D_AUTO_UPDATE_POSITION auto_update_position;
03470 } M3DPROVIDER;
03471
03472 #define AIL_enumerate_3D_provider_attributes( lib, \
03473 next, \
03474 dest) \
03475 RIB_enumerate_interface(lib,"MSS 3D audio services",RIB_ATTRIBUTE,next,dest)
03476
03477 #define AIL_3D_provider_attribute( lib, \
03478 name, \
03479 val) \
03480 { U32 token; *(S32 FAR *) val = -1; if (RIB_request_interface_entry(lib, "MSS 3D audio services",\
03481 RIB_ATTRIBUTE, name, &token) == RIB_NOERR) *(U32 FAR *) val = ((M3DPROVIDER FAR *) \
03482 RIB_provider_system_data(lib, 0))->PROVIDER_query_attribute(token); }
03483
03484 #define AIL_set_3D_provider_preference( lib, \
03485 name, \
03486 val) \
03487 { U32 token; if (RIB_request_interface_entry(lib, "MSS 3D audio services",\
03488 RIB_PREFERENCE, name, &token) == RIB_NOERR) ((M3DPROVIDER FAR *) \
03489 RIB_provider_system_data(lib, 0))->set_provider_preference(token,*(U32 FAR *) val); }
03490
03491
03492
03493
03494
03495 DXDEC H3DSAMPLE AILCALL AIL_allocate_3D_sample_handle
03496 (HPROVIDER lib);
03497
03498
03499 DXDEC void AILCALL AIL_release_3D_sample_handle
03500 (H3DSAMPLE S);
03501
03502
03503 DXDEC void AILCALL AIL_start_3D_sample (H3DSAMPLE S);
03504
03505
03506 DXDEC void AILCALL AIL_stop_3D_sample (H3DSAMPLE S);
03507
03508
03509 DXDEC void AILCALL AIL_resume_3D_sample (H3DSAMPLE S);
03510
03511 DXDEC void AILCALL AIL_end_3D_sample (H3DSAMPLE S);
03512
03513 DXDEC S32 AILCALL AIL_set_3D_sample_file (H3DSAMPLE S,
03514 void FAR *file_image);
03515
03516 DXDEC void AILCALL AIL_set_3D_sample_volume (H3DSAMPLE S,
03517 S32 volume);
03518
03519 DXDEC void AILCALL AIL_set_3D_sample_offset (H3DSAMPLE S,
03520 U32 offset);
03521
03522
03523 DXDEC void AILCALL AIL_set_3D_sample_loop_count(H3DSAMPLE S,
03524 U32 loops);
03525
03526 DXDEC void AILCALL AIL_set_3D_sample_loop_block(H3DSAMPLE S,
03527 S32 loop_start_offset,
03528 S32 loop_end_offset);
03529
03530 DXDEC U32 AILCALL AIL_3D_sample_status (H3DSAMPLE S);
03531
03532 DXDEC S32 AILCALL AIL_3D_sample_volume (H3DSAMPLE S);
03533
03534 DXDEC U32 AILCALL AIL_3D_sample_offset (H3DSAMPLE samp,
03535 AILSNDPOSTYPE type);
03536
03537 DXDEC U32 AILCALL AIL_3D_sample_length (H3DSAMPLE samp,
03538 AILSNDPOSTYPE type);
03539
03540 DXDEC U32 AILCALL AIL_3D_sample_loop_count (H3DSAMPLE S);
03541
03542 DXDEC void AILCALL AIL_set_3D_sample_distances (H3DSAMPLE S,
03543 U32 max_front_dist,
03544 U32 min_front_dist,
03545 U32 max_back_dist,
03546 U32 min_back_dist);
03547
03548
03549 DXDEC void AILCALL AIL_3D_sample_distances (H3DSAMPLE S,
03550 U32 FAR * max_front_dist,
03551 U32 FAR * min_front_dist,
03552 U32 FAR * max_back_dist,
03553 U32 FAR * min_back_dist);
03554
03555 DXDEC S32 AILCALL AIL_active_3D_sample_count (HPROVIDER lib);
03556
03557
03558
03559
03560
03561 DXDEC H3DPOBJECT AILCALL AIL_3D_open_listener (HPROVIDER lib);
03562
03563 DXDEC void AILCALL AIL_3D_close_listener (H3DPOBJECT listener);
03564
03565 DXDEC H3DPOBJECT AILCALL AIL_3D_open_object (HPROVIDER lib);
03566
03567 DXDEC void AILCALL AIL_3D_close_object (H3DPOBJECT obj);
03568
03569
03570
03571
03572
03573 DXDEC void AILCALL AIL_set_3D_position (H3DPOBJECT obj,
03574 F32 X,
03575 F32 Y,
03576 F32 Z);
03577
03578 DXDEC void AILCALL AIL_set_3D_velocity (H3DPOBJECT obj,
03579 F32 dX_per_ms,
03580 F32 dY_per_ms,
03581 F32 dZ_per_ms,
03582 F32 magnitude);
03583
03584 DXDEC void AILCALL AIL_set_3D_velocity_vector (H3DPOBJECT obj,
03585 F32 dX_per_ms,
03586 F32 dY_per_ms,
03587 F32 dZ_per_ms);
03588
03589 DXDEC void AILCALL AIL_set_3D_orientation (H3DPOBJECT obj,
03590 F32 X_face,
03591 F32 Y_face,
03592 F32 Z_face,
03593 F32 X_up,
03594 F32 Y_up,
03595 F32 Z_up);
03596
03597 DXDEC void AILCALL AIL_3D_position (H3DPOBJECT obj,
03598 F32 FAR *X,
03599 F32 FAR *Y,
03600 F32 FAR *Z);
03601
03602 DXDEC void AILCALL AIL_3D_velocity (H3DPOBJECT obj,
03603 F32 FAR *dX_per_ms,
03604 F32 FAR *dY_per_ms,
03605 F32 FAR *dZ_per_ms);
03606
03607 DXDEC void AILCALL AIL_3D_orientation (H3DPOBJECT obj,
03608 F32 FAR *X_face,
03609 F32 FAR *Y_face,
03610 F32 FAR *Z_face,
03611 F32 FAR *X_up,
03612 F32 FAR *Y_up,
03613 F32 FAR *Z_up);
03614
03615 DXDEC void AILCALL AIL_3D_update_position (H3DPOBJECT obj,
03616 F32 dt_milliseconds);
03617
03618 DXDEC void AILCALL AIL_3D_auto_update_position (H3DPOBJECT obj,
03619 S32 enable);
03620
03621 DXDEC void AILCALL AIL_set_3D_object_user_data (H3DPOBJECT obj,
03622 U32 index,
03623 S32 value);
03624
03625 DXDEC S32 AILCALL AIL_3D_object_user_data (H3DPOBJECT obj,
03626 U32 index);
03627
03628
03629
03630
03631 #ifndef EAX_H_INCLUDED
03632
03633 enum
03634 {
03635 EAX_ENVIRONMENT_GENERIC,
03636 EAX_ENVIRONMENT_PADDEDCELL,
03637 EAX_ENVIRONMENT_ROOM,
03638 EAX_ENVIRONMENT_BATHROOM,
03639 EAX_ENVIRONMENT_LIVINGROOM,
03640 EAX_ENVIRONMENT_STONEROOM,
03641 EAX_ENVIRONMENT_AUDITORIUM,
03642 EAX_ENVIRONMENT_CONCERTHALL,
03643 EAX_ENVIRONMENT_CAVE,
03644 EAX_ENVIRONMENT_ARENA,
03645 EAX_ENVIRONMENT_HANGAR,
03646 EAX_ENVIRONMENT_CARPETEDHALLWAY,
03647 EAX_ENVIRONMENT_HALLWAY,
03648 EAX_ENVIRONMENT_STONECORRIDOR,
03649 EAX_ENVIRONMENT_ALLEY,
03650 EAX_ENVIRONMENT_FOREST,
03651 EAX_ENVIRONMENT_CITY,
03652 EAX_ENVIRONMENT_MOUNTAINS,
03653 EAX_ENVIRONMENT_QUARRY,
03654 EAX_ENVIRONMENT_PLAIN,
03655 EAX_ENVIRONMENT_PARKINGLOT,
03656 EAX_ENVIRONMENT_SEWERPIPE,
03657 EAX_ENVIRONMENT_UNDERWATER,
03658 EAX_ENVIRONMENT_DRUGGED,
03659 EAX_ENVIRONMENT_DIZZY,
03660 EAX_ENVIRONMENT_PSYCHOTIC,
03661
03662 EAX_ENVIRONMENT_COUNT
03663 };
03664
03665 #endif
03666
03667 #endif
03668
03669 #ifdef __cplusplus
03670 }
03671 #endif
03672
03673
03674 #ifdef _PUSHPOP_SUPPORTED
03675 #pragma pack(pop)
03676 #else
03677 #pragma pack()
03678 #endif
03679
03680
03681 #endif