📄 mss.h
字号:
#ifdef IS_MAC
#define MAX_INSTR 150 // Max # of instruments 128 + 32
#endif
#define MIN_CHAN ( 1-1) // Min channel recognized (0-based)
#define MAX_CHAN (16-1) // Max channel recognized
#define MIN_LOCK_CHAN ( 2-1) // Min channel available for locking
#define MAX_LOCK_CHAN ( 9-1) // Max channel available for locking
#define PERCUSS_CHAN (10-1) // Percussion channel (no locking)
#define AIL_MAX_FILE_HEADER_SIZE 4096 // AIL_set_named_sample_file() requires at least 4K
// of data or the entire file image, whichever is less,
// to determine sample format
#define DIG_F_16BITS_MASK 1
#define DIG_F_STEREO_MASK 2
#define DIG_F_ADPCM_MASK 4
#define DIG_F_MONO_8 0 // PCM data formats
#define DIG_F_MONO_16 (DIG_F_16BITS_MASK)
#define DIG_F_STEREO_8 (DIG_F_STEREO_MASK)
#define DIG_F_STEREO_16 (DIG_F_STEREO_MASK|DIG_F_16BITS_MASK)
#define DIG_F_ADPCM_MONO_16 (DIG_F_ADPCM_MASK |DIG_F_16BITS_MASK)
#define DIG_F_ADPCM_STEREO_16 (DIG_F_ADPCM_MASK |DIG_F_16BITS_MASK|DIG_F_STEREO_MASK)
#define DIG_F_USING_ASI 16
#define DIG_PCM_SIGN 0x0001 // (obsolete)
#define DIG_PCM_ORDER 0x0002
#define DIG_PCM_POLARITY 0x0004 // PCM flags used by driver hardware
#define DIG_PCM_SPLIT 0x0008
#define DIG_BUFFER_SERVICE 0x0010
#define DIG_DUAL_DMA 0x0020
#define DIG_RECORDING_SUPPORTED 0x8000
#define WAVE_FORMAT_PCM 1
#define WAVE_FORMAT_IMA_ADPCM 0x0011
#ifdef IS_DOS
#define AIL3DIG 0 // .DIG driver
#define AIL3MDI 1 // .MDI driver
#define DIG_DETECT_8_BIT_ONLY 0x0001 // Detect 8-bit DMA only
#define DIG_DETECT_16_BIT_ONLY 0x0002 // Detect 16-bit DMA only
#define DIG_DETECT_8_AND_16_BITS 0x0003 // Detect both 8- and 16-bit DMA
#define DRV_INIT 0x300 // Functions common to .MDI and .DIG
#define DRV_GET_INFO 0x301 // drivers
#define DRV_SERVE 0x302
#define DRV_PARSE_ENV 0x303
#define DRV_VERIFY_IO 0x304
#define DRV_INIT_DEV 0x305
#define DRV_SHUTDOWN_DEV 0x306
#define DIG_HW_VOLUME 0x400 // .DIG driver functions
#define DIG_START_P_CMD 0x401
#define DIG_STOP_P_REQ 0x402
#define DIG_START_R_CMD 0x403
#define DIG_STOP_R_REQ 0x404
#define DIG_VSE 0x405
#define MDI_HW_VOLUME 0x500 // .MDI driver functions
#define MDI_INIT_INS_MGR 0x501
#define MDI_MIDI_XMIT 0x502
#define MDI_INSTALL_T_SET 0x503
#define MDI_GET_T_STATUS 0x504
#define MDI_PROT_UNPROT_T 0x505
#define MDI_VSE 0x506
#else
//
// Pass to AIL_midiOutOpen for NULL MIDI driver
//
#define MIDI_NULL_DRIVER ((U32)(S32)-2)
#endif
//
// Non-specific XMIDI/MIDI controllers and event types
//
#define SYSEX_BYTE 105
#define PB_RANGE 106
#define CHAN_MUTE 107
#define CALLBACK_PFX 108
#define SEQ_BRANCH 109
#define CHAN_LOCK 110
#define CHAN_PROTECT 111
#define VOICE_PROTECT 112
#define TIMBRE_PROTECT 113
#define PATCH_BANK_SEL 114
#define INDIRECT_C_PFX 115
#define FOR_LOOP 116
#define NEXT_LOOP 117
#define CLEAR_BEAT_BAR 118
#define CALLBACK_TRIG 119
#define SEQ_INDEX 120
#define GM_BANK_MSB 0
#define MODULATION 1
#define DATA_MSB 6
#define PART_VOLUME 7
#define PANPOT 10
#define EXPRESSION 11
#define GM_BANK_LSB 32
#define DATA_LSB 38
#define SUSTAIN 64
#define REVERB 91
#define CHORUS 93
#define RPN_LSB 100
#define RPN_MSB 101
#define RESET_ALL_CTRLS 121
#define ALL_NOTES_OFF 123
#define EV_NOTE_OFF 0x80
#define EV_NOTE_ON 0x90
#define EV_POLY_PRESS 0xa0
#define EV_CONTROL 0xb0
#define EV_PROGRAM 0xc0
#define EV_CHAN_PRESS 0xd0
#define EV_PITCH 0xe0
#define EV_SYSEX 0xf0
#define EV_ESC 0xf7
#define EV_META 0xff
#define META_EOT 0x2f
#define META_TEMPO 0x51
#define META_TIME_SIG 0x58
//
// SAMPLE.system_data[] usage
//
#define SSD_EOD_CALLBACK 0 // Application end-of-data callback if not NULL
#define VOC_BLK_PTR 1 // Pointer to current block
#define VOC_REP_BLK 2 // Pointer to beginning of repeat loop block
#define VOC_N_REPS 3 // # of iterations left in repeat loop
#define VOC_MARKER 4 // Marker to search for, or -1 if all
#define VOC_MARKER_FOUND 5 // Desired marker found if 1, else 0
#define SSD_RELEASE 6 // Release sample handle upon termination if >0
#define SSD_TEMP 7 // Temporary storage location for general use
//
// Timer status values
//
#define AILT_FREE 0 // Timer handle is free for allocation
#define AILT_STOPPED 1 // Timer is stopped
#define AILT_RUNNING 2 // Timer is running
//
// SAMPLE.status flag values
//
#define SMP_FREE 0x0001 // Sample is available for allocation
#define SMP_DONE 0x0002 // Sample has finished playing, or has
// never been started
#define SMP_PLAYING 0x0004 // Sample is playing
#define SMP_STOPPED 0x0008 // Sample has been stopped
#define SMP_PLAYINGBUTRELEASED 0x0010 // Sample is playing, but digital handle
// has been temporarily released
//
// SEQUENCE.status flag values
//
#define SEQ_FREE 0x0001 // Sequence is available for allocation
#define SEQ_DONE 0x0002 // Sequence has finished playing, or has
// never been started
#define SEQ_PLAYING 0x0004 // Sequence is playing
#define SEQ_STOPPED 0x0008 // Sequence has been stopped
#define SEQ_PLAYINGBUTRELEASED 0x0010 // Sequence is playing, but MIDI handle
// has been temporarily released
#ifdef IS_DOS
//
// MIDI driver types
//
#define MDIDRVRTYPE_GM 0 // General MIDI driver (Roland-compatible)
#define MDIDRVRTYPE_FM_2 1 // 2-operator FM MIDI driver (OPL2)
#define MDIDRVRTYPE_FM_4 2 // 4-operator FM MIDI driver (OPL3)
#define MDIDRVRTYPE_SPKR 3 // Tandy or PC speaker "beep" driver
//
// .INI installation result codes
//
#define AIL_INIT_SUCCESS 0 // Driver installed successfully
#define AIL_NO_INI_FILE 1 // No MDI.INI or DIG.INI file exists
#define AIL_INIT_FAILURE 2 // Driver could not be initialized
#ifdef __BORLANDC__
#ifndef REALPTR
#define REALPTR(x) ((void *) (U32) ((((U32) (x))>>16<<4) + ((x) & 0xffff) \
- AIL_sel_base(_DS)))
#endif
#else
#ifndef REALPTR
#define REALPTR(x) ((void *) (U32) ((((U32) (x))>>16<<4) + ((x) & 0xffff)))
#endif
#endif
#else
#ifdef IS_WINDOWS
//
// AIL_set_direct_buffer_control() command values
//
#define AILDS_RELINQUISH 0 // App returns control of secondary buffer
#define AILDS_SEIZE 1 // App takes control of secondary buffer
#define AILDS_SEIZE_LOOP 2 // App wishes to loop the secondary buffer
#endif
#endif
//
// General type definitions for portability
//
#ifndef C8
#define C8 char
#endif
#ifndef U8
#define U8 unsigned char
#endif
#ifndef S8
#define S8 signed char
#endif
#ifndef U16
#define U16 unsigned short
#endif
#ifndef S16
#define S16 signed short
#endif
#ifndef U32
#define U32 unsigned long
#endif
#ifndef S32
#define S32 signed long
#endif
#ifndef F32
#define F32 float
#endif
#ifndef F64
#define F64 double
#endif
#ifndef REALFAR
#define REALFAR unsigned long
#endif
#ifndef FILE_ERRS
#define FILE_ERRS
#define AIL_NO_ERROR 0
#define AIL_IO_ERROR 1
#define AIL_OUT_OF_MEMORY 2
#define AIL_FILE_NOT_FOUND 3
#define AIL_CANT_WRITE_FILE 4
#define AIL_CANT_READ_FILE 5
#define AIL_DISK_FULL 6
#endif
#define MIN_VAL 0
#define NOM_VAL 1
#define MAX_VAL 2
#ifndef YES
#define YES 1
#endif
#ifndef NO
#define NO 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
//
// Preference names and default values
//
#define DIG_RESAMPLING_TOLERANCE 0
#define DEFAULT_DRT 131 // Resampling triggered at +/- 0.2%
#define DIG_MIXER_CHANNELS 1
#define DEFAULT_DMC 64 // 64 allocatable SAMPLE structures
#define DIG_MAX_PREDELAY_MS 2
#define DEFAULT_MPDMS 500 // Max predelay reverb time in ms
#define MDI_SERVICE_RATE 3
#define DEFAULT_MSR 120 // XMIDI sequencer timing = 120 Hz
#define MDI_SEQUENCES 4
#define DEFAULT_MS 8 // 8 sequence handles/driver
#define MDI_DEFAULT_VOLUME 5
#define DEFAULT_MDV 127 // Default sequence volume = 127 (0-127)
#define MDI_QUANT_ADVANCE 6
#define DEFAULT_MQA 1 // Beat/bar count +1 interval
#define MDI_ALLOW_LOOP_BRANCHING 7
#define DEFAULT_ALB NO // Branches cancel XMIDI FOR loops
#define MDI_DEFAULT_BEND_RANGE 8
#define DEFAULT_MDBR 2 // Default pitch-bend range = 2
#ifdef IS_X86
#define MDI_DOUBLE_NOTE_OFF 9
#define DEFAULT_MDNO NO // For stuck notes on SB daughterboards
#endif
#define DIG_ENABLE_RESAMPLE_FILTER 31 // Enable resampling filter by
#define DEFAULT_DERF YES // default
#if defined(IS_WINDOWS) || defined(IS_MAC)
#define MDI_SYSEX_BUFFER_SIZE 10
#define DEFAULT_MSBS 1536 // Default sysex buffer = 1536 bytes
#define DIG_OUTPUT_BUFFER_SIZE 11
#define DEFAULT_DOBS 49152 // 48K output buffer size
#define AIL_MM_PERIOD 12
#define DEFAULT_AMP 5 // Default MM timer period = 5 msec.
#endif
#ifdef IS_MAC
#define DIG_SM_FRAGMENT_SIZE 34
#define DEFAULT_DSFS 20 // Use 20 millisecond buffer fragments with Sound Manager
#define DIG_SM_MIX_FRAGMENT_CNT 42
#define DEFAULT_DSMFC 2 // Buffer two fragments ahead
#define DIG_SM_FRAGMENT_CNT 35
#define DEFAULT_DSFC 16 // Use 16 buffer fragments with Sound Manager
#endif
#ifdef IS_WINDOWS
#define DIG_DS_FRAGMENT_SIZE 34
#define DEFAULT_DDFS 8 // Use 8 millisecond buffer fragments with DirectSound if MSS mixer in use
#define DIG_DS_FRAGMENT_CNT 35
#define DEFAULT_DDFC 96 // Use 96 buffer fragments with DirectSound if MSS mixer in use
#define DIG_DS_MIX_FRAGMENT_CNT 42
#define DEFAULT_DDMFC 8 // Mix ahead 8 buffer fragments
#define DIG_DS_USE_PRIMARY 36
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -