📄 mss.h
字号:
#define DEFAULT_DDUP NO // Mix into secondary DirectSound buffer by default
#define DIG_DS_DSBCAPS_CTRL3D 37
#define DEFAULT_DDDC NO // Do not use DSBCAPS_CTRL3D by default
#define DIG_DS_CREATION_HANDLER 38
#define DEFAULT_DDCH NULL // Use DirectSoundCreate() by default
#define AIL_TIMERS 13
#define DEFAULT_AT 16 // 16 allocatable HTIMER handles
#define DIG_MAX_CHAIN_ELEMENT_SIZE 14
#define DEFAULT_MCES 8192 // max of 8192 bytes/waveOut buffer
#define DIG_MIN_CHAIN_ELEMENT_TIME 45
#define DEFAULT_MCET 100 // 100 milliseconds buffers
#define DIG_USE_WAVEOUT 15
#define DEFAULT_DUW NO // Use DirectSound by default
#define DIG_DS_SECONDARY_SIZE 16
#define DEFAULT_DDSS (32*1024L) // Must be 2^n -- use 32K by default
#define DIG_DS_SAMPLE_CEILING 17
#define DEFAULT_DDSC 44100 // Allow up to 44 kHz samples
#define AIL_LOCK_PROTECTION 18
#define DEFAULT_ALP NO // Don't suspend foreground thread by default
#define AIL_MUTEX_PROTECTION 44
#define DEFAULT_AMPR YES // Lock each call into Miles with a mutex
#else
#ifdef IS_DOS
#define DIG_SERVICE_RATE 10
#define DEFAULT_DSR 200 // DMA buffer-polling rate = 200 Hz
#define DIG_HARDWARE_SAMPLE_RATE 11
#define DEFAULT_DHSR NOM_VAL // Use nominal sample rate by default
#define DIG_DMA_RESERVE 12
#define DEFAULT_DDR 32768 // Reserve 32K real-mode mem for DMA
#define DIG_LATENCY 13
#define DEFAULT_DL 100 // Half-buffer size in ms = 100
#define DIG_USE_STEREO 14
#define DEFAULT_DUS NO // Use mono output only
#define DIG_USE_16_BITS 15
#define DEFAULT_DU16 NO // Use 8-bit output by default
#define DIG_ALLOW_16_BIT_DMA 16
#define DEFAULT_DA16DMA YES // OK to use 16-bit DMA if necessary
#define DIG_SS_LOCK 17
#define DEFAULT_DSL NO // Don't disable IRQs while mixing
#define AIL_SCAN_FOR_HARDWARE 18
#define DEFAULT_ASH YES // Scan for I/O settings if necessary
#define AIL_ALLOW_VDM_EXECUTION 19
#define DEFAULT_AVE YES // Allow Windows "DOS box" execution
#endif
#endif
// ----------------------------------
// DLS Preference names and default values
// Unless otherwise specified, values must be established
// BEFORE calling DLSMSSOpen()!
// ----------------------------------
#define DLS_TIMEBASE 20
#define DEFAULT_DTB 120 // 120 intervals/second by default
#define DLS_VOICE_LIMIT 21
#define DEFAULT_DVL 32 // 32 voices supported
#define DLS_BANK_SELECT_ALIAS 22
#define DEFAULT_DBSA NO // Do not treat controller 114 as bank
#define DLS_STREAM_BOOTSTRAP 23 // Don't submit first stream buffer
#define DEFAULT_DSB YES // until at least 2 available
#define DLS_VOLUME_BOOST 24
#define DEFAULT_DVB 0 // Boost final volume by 0 dB
#define DLS_ENABLE_FILTERING 25 // Filtering = on by default
#define DEFAULT_DEF YES // (may be changed at any time)
#ifdef IS_X86
#define AIL_ENABLE_MMX_SUPPORT 27 // Enable MMX support if present
#define DEFAULT_AEMS YES // (may be changed at any time)
#endif
#define DLS_GM_PASSTHROUGH 28 // Pass unrecognized traffic on to
#define DEFAULT_DGP YES // default GM driver layer
// (may be changed at any time)
#define DLS_ADPCM_TO_ASI_THRESHOLD 39 // Size in samples to switch to ASI
#define DEFAULT_DATAT 32768
//
// Add'l platform-independent prefs
//
#define DIG_INPUT_LATENCY 41 // Use >= 250-millisecond input buffers if
#define DEFAULT_DIL 250 // explicit size request cannot be satisfied
#ifdef IS_WINDOWS
#define DIG_USE_WAVEIN 43
#define DEFAULT_DUWI YES // Use waveIn for input by default
#endif
#define N_PREFS 46 // # of preference types
typedef struct _AILSOUNDINFO {
S32 format;
void const FAR* data_ptr;
U32 data_len;
U32 rate;
S32 bits;
S32 channels;
U32 samples;
U32 block_size;
void const FAR* initial_ptr;
} AILSOUNDINFO;
#ifndef RIB_H // RIB.H contents included if RIB.H not already included
// #include "rib.h"
#define RIB_H
#define ARY_CNT(x) (sizeof((x)) / sizeof((x)[0]))
// ----------------------------------
// RIB data types
// ----------------------------------
typedef S32 RIBRESULT;
#define RIB_NOERR 0 // Success -- no error
#define RIB_NOT_ALL_AVAILABLE 1 // Some requested functions/attribs not available
#define RIB_NOT_FOUND 2 // Resource not found
#define RIB_OUT_OF_MEM 3 // Out of system RAM
//
// Handle to interface provider
//
typedef U32 HPROVIDER;
//
// Handle representing token used to obtain attribute or preference
// data from RIB provider
//
typedef U32 HATTRIB;
//
// Handle representing an enumerated interface entry
//
// RIB_enumerate_interface() returns 1 if valid next entry found, else
// 0 if end of list reached
//
typedef U32 HINTENUM;
#define HINTENUM_FIRST 0
//
// Handle representing an enumerated provider entry
//
// RIB_enumerate_providers() returns 1 if valid next entry found, else
// 0 if end of list reached
//
typedef U32 HPROENUM;
#define HPROENUM_FIRST 0
//
// Data types for RIB attributes and preferences
//
typedef enum
{
RIB_NONE = 0, // No type
RIB_CUSTOM, // Used for pointers to application-specific structures
RIB_DEC, // Used for 32-bit integer values to be reported in decimal
RIB_HEX, // Used for 32-bit integer values to be reported in hex
RIB_FLOAT, // Used for 32-bit single-precision FP values
RIB_PERCENT, // Used for 32-bit single-precision FP values to be reported as percentages
RIB_BOOL, // Used for Boolean-constrained integer values to be reported as TRUE or FALSE
RIB_STRING // Used for pointers to null-terminated ASCII strings
}
RIB_DATA_SUBTYPE;
//
// RIB_ENTRY_TYPE structure, used to register an interface or request one
//
typedef enum
{
RIB_FUNCTION = 0,
RIB_ATTRIBUTE, // Attribute: read-only data type used for status/info communication
RIB_PREFERENCE // Preference: read/write data type used to control behavior
}
RIB_ENTRY_TYPE;
//
// RIB_INTERFACE_ENTRY, used to represent a function or data entry in an
// interface
//
typedef struct
{
RIB_ENTRY_TYPE type; // See list above
C8 FAR *entry_name; // Name of desired function or attribute
U32 token; // Function pointer or attribute token
RIB_DATA_SUBTYPE subtype; // Data (attrib or preference) subtype
}
RIB_INTERFACE_ENTRY;
//
// Standard RAD Interface Broker provider identification attributes
//
#define PROVIDER_NAME (-100) // RIB_STRING name of decoder
#define PROVIDER_VERSION (-101) // RIB_HEX BCD version number
//
// Standard function to obtain provider attributes (see PROVIDER_ defines
// above)
//
// Each provider of a searchable interface must export this function
//
typedef U32 (AILCALL FAR *PROVIDER_QUERY_ATTRIBUTE) (HATTRIB index);
//
// Macros to simplify interface registrations/requests for functions,
// attributes, and preferences
//
#define FN(entry_name) { RIB_FUNCTION, #entry_name, (U32) &(entry_name), RIB_NONE }
#define REG_FN(entry_name) { RIB_FUNCTION, #entry_name, (U32) &(entry_name), RIB_NONE }
#define AT(entry_name,ID) { RIB_ATTRIBUTE, (entry_name), (U32) &(ID), RIB_NONE }
#define REG_AT(entry_name,ID,subtype) { RIB_ATTRIBUTE, (entry_name), (U32) (ID), subtype }
#define PR(entry_name,ID) { RIB_PREFERENCE, (entry_name), (U32) &(ID), RIB_NONE }
#define REG_PR(entry_name,ID,subtype) { RIB_PREFERENCE, (entry_name), (U32) (ID), subtype }
#define RIB_register(x,y,z) RIB_register_interface (HPROVIDER(x), y, ARY_CNT(z), z)
#define RIB_unregister(x,y,z) RIB_unregister_interface(HPROVIDER(x), y, ARY_CNT(z), z)
#define RIB_unregister_all(x) RIB_unregister_interface(HPROVIDER(x), NULL, 0, NULL)
#define RIB_free_libraries() RIB_free_provider_library(HPROVIDER(NULL));
#define RIB_request(x,y,z) RIB_request_interface (x, y, ARY_CNT(z), z)
// ----------------------------------
// Standard RIB API prototypes
// ----------------------------------
DXDEC HPROVIDER AILCALL RIB_alloc_provider_handle (U32 module);
DXDEC void AILCALL RIB_free_provider_handle (HPROVIDER provider);
DXDEC HPROVIDER AILCALL RIB_load_provider_library (C8 const FAR *filename);
DXDEC void AILCALL RIB_free_provider_library (HPROVIDER provider);
DXDEC HPROVIDER AILCALL RIB_provider_library_handle (void);
DXDEC RIBRESULT AILCALL RIB_register_interface (HPROVIDER provider,
C8 const FAR *interface_name,
S32 entry_count,
RIB_INTERFACE_ENTRY const FAR *rlist);
DXDEC RIBRESULT AILCALL RIB_unregister_interface (HPROVIDER provider,
C8 const FAR *interface_name,
S32 entry_count,
RIB_INTERFACE_ENTRY const FAR *rlist);
DXDEC RIBRESULT AILCALL RIB_request_interface (HPROVIDER provider,
C8 const FAR *interface_name,
S32 entry_count,
RIB_INTERFACE_ENTRY FAR *rlist);
DXDEC RIBRESULT AILCALL RIB_request_interface_entry (HPROVIDER provider,
C8 const FAR *interface_name,
RIB_ENTRY_TYPE entry_type,
C8 const FAR *entry_name,
U32 FAR *token);
DXDEC S32 AILCALL RIB_enumerate_interface (HPROVIDER provider,
C8 FAR *interface_name,
RIB_ENTRY_TYPE type,
HINTENUM FAR *next,
RIB_INTERFACE_ENTRY FAR *dest);
DXDEC S32 AILCALL RIB_enumerate_providers (C8 FAR *interface_name,
HPROENUM FAR *next,
HPROVIDER FAR *dest);
DXDEC C8 FAR * AILCALL RIB_type_string (U32 data,
RIB_DATA_SUBTYPE subtype);
DXDEC HPROVIDER AILCALL RIB_find_file_provider (C8 const FAR *interface_name,
C8 const FAR *attribute_name,
C8 const FAR *file_suffix);
DXDEC HPROVIDER AILCALL RIB_find_provider (C8 const FAR *interface_name,
C8 const FAR *attribute_name,
C8 const FAR *attribute_value);
DXDEC HPROVIDER AILCALL RIB_find_files_provider (C8 const FAR *interface_name,
C8 const FAR *attribute_name_1,
C8 const FAR *file_suffix_1,
C8 const FAR *attribute_name_2,
C8 const FAR *file_suffix_2);
DXDEC HPROVIDER AILCALL RIB_find_file_dec_provider (C8 const FAR *interface_name,
C8 const FAR *attribute_name_1,
U32 attribute_value_1,
C8 const FAR *attribute_name_2,
C8 const FAR *file_suffix_2);
DXDEC S32 AILCALL RIB_load_application_providers
(C8 const FAR *filespec);
DXDEC void AILCALL RIB_set_provider_user_data (HPROVIDER provider,
U32 index,
S32 value);
DXDEC S32 AILCALL RIB_provider_user_data (HPROVIDER provider,
U32 index);
DXDEC void AILCALL RIB_set_provider_system_data
(HPROVIDER provider,
U32 index,
S32 value);
DXDEC S32 AILCALL RIB_provider_system_data (HPROVIDER provider,
U32 index);
DXDEC C8 FAR * AILCALL RIB_error (void);
#endif
#ifndef MSS_ASI_VERSION // MSSASI.H contents included if MSSASI.H not already included
// #include "mssasi.h"
#define AIL_ASI_VERSION 1
#define AIL_ASI_REVISION 0
//
// Handle to stream being managed by ASI codec
//
typedef S32 HASISTREAM;
//
// ASI result codes
//
typedef S32 ASIRESULT;
#define ASI_NOERR 0 // Success -- no error
#define ASI_NOT_ENABLED 1 // ASI not enabled
#define ASI_ALREADY_STARTED 2 // ASI already started
#define ASI_INVALID_PARAM 3 // Invalid parameters used
#define ASI_INTERNAL_ERR 4 // Internal error in ASI driver
#define ASI_OUT_OF_MEM 5 // Out of system RAM
#define ASI_ERR_NOT_IMPLEMENTED 6 // Feature not implemented
#define ASI_NOT_FOUND 7 // ASI supported device not found
#define ASI_NOT_INIT 8 // ASI not initialized
#define ASI_CLOSE_ERR 9 // ASI not closed correctly
// ----------------------------------
// Application-provided ASI callbacks
// ----------------------------------
//
// AILASIFETCHCB: Called by ASI to obtain data from stream source
//
// offset normally will be either 0 at the first call made by the codec
// or -1 to specify a continuous stream, except when ASI_stream_seek()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -