📄 mss.h
字号:
// is called to restart the stream codec at a new stream offset. In this
// case, the application must execute the seek operation on the ASI codec's
// behalf.
//
// In response to this callback, the application should read the requested
// data and copy it to the specified destination buffer, returning the number
// of bytes copied (which can be less than bytes_requested if the end of
// the stream is reached).
//
typedef S32 (AILCALLBACK FAR * AILASIFETCHCB) (U32 user, // User value passed to ASI_open_stream()
void FAR *dest, // Location to which stream data should be copied by app
S32 bytes_requested, // # of bytes requested by ASI codec
S32 offset); // If not -1, application should seek to this point in stream
//############################################################################
//## ##
//## Interface "ASI codec" ##
//## ##
//############################################################################
//
// Initialize ASI stream codec
//
// No other ASI functions may be called outside an ASI_startup() /
// ASI_shutdown() pair, except for the standard RIB function
// PROVIDER_query_attribute(). All provider attributes must be accessible
// without starting up the codec.
//
typedef ASIRESULT (AILCALL FAR *ASI_STARTUP)(void);
//
// Shut down ASI codec
//
typedef ASIRESULT (AILCALL FAR * ASI_SHUTDOWN)(void);
//
// Return codec error message, or NULL if no errors have occurred since
// last call
//
// The ASI error text state is global to all streams
//
typedef C8 FAR * (AILCALL FAR * ASI_ERROR)(void);
//############################################################################
//## ##
//## Interface "ASI stream" ##
//## ##
//############################################################################
//
// Open a stream, returning handle to stream
//
typedef HASISTREAM (AILCALL FAR *ASI_STREAM_OPEN) (U32 user, // User value passed to fetch callback
AILASIFETCHCB fetch_CB, // Source data fetch handler
U32 total_size); // Total size for %-done calculations (0=unknown)
//
// Translate data in stream, returning # of bytes actually decoded or encoded
//
// Any number of bytes may be requested. Requesting more data than is
// available in the codec's internal buffer will cause the AILASIFETCHCB
// handler to be called to fetch more data from the stream.
//
typedef S32 (AILCALL FAR *ASI_STREAM_PROCESS) (HASISTREAM stream, // Handle of stream
void FAR *buffer, // Destination for processed data
S32 buffer_size); // # of bytes to return in buffer
//
// Restart stream decoding process at new offset
//
// Relevant for decoders only
//
// Seek destination is given as offset in bytes from beginning of stream
//
// At next ASI_stream_process() call, decoder will seek to the closest possible
// point in the stream which occurs at or after the specified position
//
// This function has no effect for decoders which do not support random
// seeks on a given stream type
//
// Warning: some decoders may need to implement seeking by reparsing
// the entire stream up to the specified offset, through multiple calls
// to the data-fetch callback. This operation may be extremely
// time-consuming on large files or slow network connections.
//
// A stream_offset value of -1 may be used to inform the decoder that the
// application has changed the input stream offset on its own, e.g. for a
// double-buffering application where the ASI decoder is not accessing the
// stream directly. ASI decoders should respond to this by flushing all
// internal buffers and resynchronizing themselves to the data stream.
//
typedef ASIRESULT (AILCALL FAR *ASI_STREAM_SEEK) (HASISTREAM stream,
S32 stream_offset);
//
// Retrieve an ASI stream attribute or preference value by index
//
typedef S32 (AILCALL FAR *ASI_STREAM_ATTRIBUTE) (HASISTREAM stream,
HATTRIB attrib);
//
// Set an ASI stream preference value by index
//
typedef S32 (AILCALL FAR *ASI_STREAM_SET_PREFERENCE) (HASISTREAM stream,
HATTRIB preference,
void const FAR * value);
//
// Close stream, freeing handle and all internally-allocated resources
//
typedef ASIRESULT (AILCALL FAR *ASI_STREAM_CLOSE) (HASISTREAM stream);
#endif
//############################################################################
//## ##
//## Interface "MSS 3D audio services" ##
//## ##
//############################################################################
//
// 3D positioning services
//
typedef struct h3DPOBJECT
{
U32 junk;
} h3DPOBJECT;
typedef h3DPOBJECT FAR * H3DPOBJECT;
typedef H3DPOBJECT H3DSAMPLE;
//
// M3D result codes
//
typedef S32 M3DRESULT;
#define M3D_NOERR 0 // Success -- no error
#define M3D_NOT_ENABLED 1 // M3D not enabled
#define M3D_ALREADY_STARTED 2 // M3D already started
#define M3D_INVALID_PARAM 3 // Invalid parameters used
#define M3D_INTERNAL_ERR 4 // Internal error in M3D driver
#define M3D_OUT_OF_MEM 5 // Out of system RAM
#define M3D_ERR_NOT_IMPLEMENTED 6 // Feature not implemented
#define M3D_NOT_FOUND 7 // M3D supported device not found
#define M3D_NOT_INIT 8 // M3D not initialized
#define M3D_CLOSE_ERR 9 // M3D not closed correctly
typedef void (AILCALLBACK FAR* AIL3DSAMPLECB) (H3DSAMPLE sample);
typedef M3DRESULT (AILCALL FAR *M3D_STARTUP)(void);
typedef M3DRESULT (AILCALL FAR *M3D_SHUTDOWN)(void);
typedef C8 FAR * (AILCALL FAR *M3D_ERROR)(void);
typedef S32 (AILCALL FAR *M3D_SET_PROVIDER_PREFERENCE)(HATTRIB preference,
void const FAR * value);
typedef M3DRESULT (AILCALL FAR * M3D_ACTIVATE)(S32 enable);
typedef H3DSAMPLE (AILCALL FAR * M3D_ALLOCATE_3D_SAMPLE_HANDLE)(void);
typedef void (AILCALL FAR * M3D_RELEASE_3D_SAMPLE_HANDLE)(H3DSAMPLE samp);
typedef void (AILCALL FAR * M3D_START_3D_SAMPLE)(H3DSAMPLE samp);
typedef void (AILCALL FAR * M3D_STOP_3D_SAMPLE)(H3DSAMPLE samp);
typedef void (AILCALL FAR * M3D_RESUME_3D_SAMPLE)(H3DSAMPLE samp);
typedef void (AILCALL FAR * M3D_END_3D_SAMPLE)(H3DSAMPLE samp);
typedef S32 (AILCALL FAR * M3D_SET_3D_SAMPLE_DATA)(H3DSAMPLE samp,
AILSOUNDINFO const FAR *info);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_VOLUME)(H3DSAMPLE samp,
F32 volume);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_PLAYBACK_RATE)(H3DSAMPLE samp,
S32 playback_rate);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_OFFSET)(H3DSAMPLE samp,
U32 offset);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_LOOP_COUNT)(H3DSAMPLE samp,
U32 loops);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_LOOP_BLOCK)(H3DSAMPLE S,
S32 loop_start_offset,
S32 loop_end_offset);
typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_STATUS)(H3DSAMPLE samp);
typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_ATTRIBUTE)(H3DSAMPLE samp, HATTRIB index);
typedef S32 (AILCALL FAR * M3D_3D_SET_SAMPLE_PREFERENCE)(H3DSAMPLE samp, HATTRIB preference, void const FAR * value);
typedef F32 (AILCALL FAR * M3D_3D_SAMPLE_VOLUME)(H3DSAMPLE samp);
typedef S32 (AILCALL FAR * M3D_3D_SAMPLE_PLAYBACK_RATE)(H3DSAMPLE samp);
typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_OFFSET)(H3DSAMPLE samp);
typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_LENGTH)(H3DSAMPLE samp);
typedef U32 (AILCALL FAR * M3D_3D_SAMPLE_LOOP_COUNT)(H3DSAMPLE samp);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_DISTANCES)(H3DSAMPLE samp,
F32 max_dist,
F32 min_dist);
typedef void (AILCALL FAR * M3D_3D_SAMPLE_DISTANCES)(H3DSAMPLE samp,
F32 FAR * max_dist,
F32 FAR * min_dist);
typedef S32 (AILCALL FAR * M3D_ACTIVE_3D_SAMPLE_COUNT)(void);
typedef H3DPOBJECT (AILCALL FAR * M3D_3D_OPEN_LISTENER)(void);
typedef void (AILCALL FAR * M3D_3D_CLOSE_LISTENER)(H3DPOBJECT listener);
typedef H3DPOBJECT (AILCALL FAR * M3D_3D_OPEN_OBJECT)(void);
typedef void (AILCALL FAR * M3D_3D_CLOSE_OBJECT)(H3DPOBJECT obj);
typedef void (AILCALL FAR * M3D_SET_3D_POSITION)(H3DPOBJECT obj,
F32 X,
F32 Y,
F32 Z);
typedef void (AILCALL FAR * M3D_SET_3D_VELOCITY)(H3DPOBJECT obj,
F32 dX_per_ms,
F32 dY_per_ms,
F32 dZ_per_ms,
F32 magnitude);
typedef void (AILCALL FAR * M3D_SET_3D_VELOCITY_VECTOR)(H3DPOBJECT obj,
F32 dX_per_ms,
F32 dY_per_ms,
F32 dZ_per_ms);
typedef void (AILCALL FAR * M3D_SET_3D_ORIENTATION)(H3DPOBJECT obj,
F32 X_face,
F32 Y_face,
F32 Z_face,
F32 X_up,
F32 Y_up,
F32 Z_up);
typedef void (AILCALL FAR * M3D_3D_POSITION)(H3DPOBJECT obj,
F32 FAR *X,
F32 FAR *Y,
F32 FAR *Z);
typedef void (AILCALL FAR * M3D_3D_VELOCITY)(H3DPOBJECT obj,
F32 FAR *dX_per_ms,
F32 FAR *dY_per_ms,
F32 FAR *dZ_per_ms);
typedef void (AILCALL FAR * M3D_3D_ORIENTATION)(H3DPOBJECT obj,
F32 FAR *X_face,
F32 FAR *Y_face,
F32 FAR *Z_face,
F32 FAR *X_up,
F32 FAR *Y_up,
F32 FAR *Z_up);
typedef void (AILCALL FAR * M3D_3D_UPDATE_POSITION)(H3DPOBJECT obj,
F32 dt_milliseconds);
typedef void (AILCALL FAR * M3D_3D_AUTO_UPDATE_POSITION)(H3DPOBJECT obj,
S32 enable);
typedef S32 (AILCALL FAR * M3D_3D_ROOM_TYPE)(void);
typedef void (AILCALL FAR * M3D_SET_3D_ROOM_TYPE)(S32 EAX_room_type);
typedef S32 (AILCALL FAR * M3D_3D_SPEAKER_TYPE)(void);
typedef void (AILCALL FAR * M3D_SET_3D_SPEAKER_TYPE)(S32 speaker_type);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_OBSTRUCTION)(H3DSAMPLE samp, F32 obstruction);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_OCCLUSION)(H3DSAMPLE samp, F32 occlusion);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_EXCLUSION)(H3DSAMPLE samp, F32 exclusion);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_EFFECTS_LEVEL)(H3DSAMPLE samp, F32 effects_level);
typedef F32 (AILCALL FAR * M3D_3D_SAMPLE_OBSTRUCTION)(H3DSAMPLE samp);
typedef F32 (AILCALL FAR * M3D_3D_SAMPLE_OCCLUSION)(H3DSAMPLE samp);
typedef F32 (AILCALL FAR * M3D_3D_SAMPLE_EXCLUSION)(H3DSAMPLE samp);
typedef F32 (AILCALL FAR * M3D_3D_SAMPLE_EFFECTS_LEVEL)(H3DSAMPLE samp);
typedef F32 (AILCALL FAR * M3D_3D_ROLLOFF_FACTOR)(void);
typedef void (AILCALL FAR * M3D_SET_3D_ROLLOFF_FACTOR)(F32 factor);
typedef F32 (AILCALL FAR * M3D_3D_DOPPLER_FACTOR)(void);
typedef void (AILCALL FAR * M3D_SET_3D_DOPPLER_FACTOR)(F32 factor);
typedef F32 (AILCALL FAR * M3D_3D_DISTANCE_FACTOR)(void);
typedef void (AILCALL FAR * M3D_SET_3D_DISTANCE_FACTOR)(F32 factor);
typedef AIL3DSAMPLECB (AILCALL FAR * M3D_SET_3D_EOS)(H3DSAMPLE client,H3DSAMPLE samp,AIL3DSAMPLECB cb);
typedef void (AILCALL FAR * M3D_SET_3D_SAMPLE_CONE)(H3DSAMPLE samp, F32 inner_angle, F32 outer_angle, F32 outer_volume);
typedef void (AILCALL FAR * M3D_3D_SAMPLE_CONE)(H3DSAMPLE samp, F32 FAR* inner_angle, F32 FAR* outer_angle, F32 FAR* outer_volume);
//############################################################################
//## ##
//## Interface "MSS mixer services" ##
//## ##
//############################################################################
//
// Operation flags used by mixer module
//
#define M_DEST_STEREO 1 // Set to enable stereo mixer output
#define M_SRC_16 2 // Set to enable mixing of 16-bit samples
#define M_FILTER 4 // Set to enable filtering when resampling
#define M_SRC_STEREO 8 // Set to enable mixing of stereo input samples
#define M_VOL_SCALING 16 // Set to enable volume scalars other than 2048
#define M_RESAMPLE 32 // Set to enable playback ratios other than 65536
#define M_ORDER 64 // Set to reverse L/R stereo order for sample
#ifdef IS_32
//
// Initialize mixer
//
// No other mixer functions may be called outside a MIXER_startup() /
// MIXER_shutdown() pair, except for the standard RIB function
// PROVIDER_query_attribute(). All provider attributes must be accessible
// without starting up the module.
//
typedef void (AILCALL FAR *MIXER_STARTUP)(void);
//
// Shut down mixer
//
typedef void (AILCALL FAR *MIXER_SHUTDOWN)(void);
//
// Flush mixer buffer
//
typedef void (AILCALL FAR *MIXER_FLUSH) (S32 FAR *dest,
S32 len
#ifdef IS_X86
,U32 MMX_available
#endif
);
//
// Perform audio mixing operation
//
typedef void (AILCALL FAR *MIXER_MERGE) (void const FAR * FAR *src,
U32 FAR *src_fract,
void const FAR *src_end,
S32 FAR * FAR *dest,
void FAR *dest_end,
S32 FAR *left_val,
S32 FAR *right_val,
S32 playback_ratio,
S32 scale_left,
S32 scale_right,
U32 operation
#ifdef IS_X86
,U32 MMX_available
#endif
);
//
// Translate mixer buffer contents to final output format
//
#ifdef IS_MAC
typedef void (AILCALL FAR *MIXER_COPY) (void const FAR *src,
S32 src_len,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -