/* =================== Acoustetron General Header =================== */ /* === Copyright (c) 1991-2000 by AuSIM, Inc. === */ /* === All rights reserved. === */ /* ==================================================================== */ /* ==+--------------------------------------------------------------+== */ /* ==| This header contains enumerations, definitions, and macros |== */ /* ==| that are common to all CRE 3D audio software products. It |== */ /* ==| is included by the BTRON.H, CTRON.H, and CRE_TRON.H library |== */ /* ==| header files which contain mutually independent information. |== */ /* ==+--------------------------------------------------------------+== */ #ifndef ATRON_H #define ATRON_H #define ATRON_VERSION 1.310f /* CRE client/server protocol */ /* new for 1.300 = event handling, backwards compatible */ /* == ATRON driver ID's: == */ /* == These integers are registered and embedded in the respective == */ /* == DSP binaries to ensure driver compatibility. The CRE_TRON == */ /* == functions cre_init() and cre_close() use these enumerations == */ /* == to initialize or terminate a selected driver. == */ /* == --- Enumerated in chronological order ... DO NOT DISRUPT == */ enum ATRNdriver { Atrn_CLOS, /* special close all drivers indicator */ Atrn_ARS1, /* Acoustic Room Simulator release 1, outdated. */ Atrn_DPL1, /* Doppler Processor 1, 1 source per Spectrum. */ Atrn_CMP1, /* Convolvotron Minimum Phase release 1. */ Atrn_BMP1, /* Alpha/Beachtron Minimum Phase release 1. */ Atrn_BMP2, /* Alpha/Beachtron Minimum Phase 22kHz. */ Atrn_BMP3, /* Alpha/Beachtron Minimum Phase Doppler. */ Atrn_BMP4, /* Alpha/Beachtron Transmission Loss Filter. */ Atrn_ARS2, /* Acoustic Room Simulator release 2. */ Atrn_SAB1, /* Replaced with Atron_HOLD below */ Atrn_SAD1, /* Replaced with Atron_RESET below */ Atrn_ARS3, /* Acoustic Room Simulator release 3 (July 1995) */ Atrn_ASM1, /* for AuSIM Engineering server auto sample rate */ Atrn_AS48, /* for AuSIM Engineering server 48kHz driver */ Atrn_AS88, /* for AuSIM Engineering server 88kHz driver */ Atrn_AS96, /* for AuSIM Engineering server 96kHz driver */ Atrn_AS44, /* for AuSIM Engineering server 44kHz driver */ AtrnLASTdriver, Atrn_HOLD = Atrn_SAD1, /* used for hold audio */ Atrn_RESET = Atrn_SAB1 /* signals a server reset in cre_close */ }; /* == BOOTtime: relative boot times per source requested. == */ #define AtrnBOOTtime { 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2 } /* reference symbols - - - C1 B1 - B3 B4 - - - - */ #define MAX_HEADS 16 /* ListenerHeads: Theoretically 15 */ #define MAX_ASRCS 64 /* AudioSources: Theoretically 46 */ #define MAX_DPRFL 32 /* DirectionProfile: Arbitrary / reasonable */ /* == Directional Radiation Profile coefficient limit == */ #define MAX_RADPROFILE (MAX_DPRFL-1) /* reserves storage */ #define ALL_SOURCES -1 #define ALL_HEADS -1 #define ALL_PROPVOLMS -1 #define ALL_DRIVERS -1 #define JSACOUNTS 0x3F #define JSACNTSTR "Jsabbies" /* smallest units of AuSIM3D */ /* == EulerSpace-Definition enumeration ------------------------ == */ /* == 6D coordinate standard for all float lists == */ enum ATRNspaceDef { AtrnX, AtrnY, AtrnZ, AtrnYAW, AtrnPTC, AtrnROL, AtrnDOF }; /* == Units-Definitions enumeration ---------------------------- == */ enum ATRNunitsDef { AtrnINCHES, Atrn_FEET_, AtrnMMETER, AtrnCMETER, Atrn_METER, AtrnUNITSlast }; /* == Initialization HEAD bits maybe OR'd with head ID == */ #define _ORATOR_ 0x0040 /* creates a voice for the listener */ #define AtrnHeadID (0x007F&~_ORATOR_) /* listener ID bit-stripper */ #define AtrnLASTheadID 16 /* without AtrnHeadDevice specified, the system selects based on WAVOUTDEV */ #define AtrnHeadDevShift 8 #define AtrnHeadDevice (0x3F< */ AtrnHEADlink, /* + enables source to head linkage */ AtrnHEADunlink, /* disables source to head linkage */ AtrnSPRDrolloff, /* + sets the rolloff factor <1.0> */ AtrnGAINdist, /* distance at which gain is specified */ AtrnCHNLinput, /* + selects live input channel */ AtrnCHNLmidi, /* + selects midi input channel */ AtrnDPLRfactor, /* pts = listener ID, data = factor */ AtrnTIMEdelay, /* selects: None, Relative, Absolute */ AtrnLoadSrcModelDeprecated, /* No longer supported. Use LoadModel */ AtrnSetSrcModelAttrDeprecated, /* No longer supported. Use SetAttributeDouble */ AtrnSrcModelEnableDeprecated, /* No longer supported. Use EnableModel */ AtrnSRCgroundReflectionGain, /* pts = 1, data = one float */ AtrnSRCinterpolator, /* pts = 1, data = one unsigned int */ AtrnPATHgainForSrc, /* sets gain for a source/listener pair */ AtrnSRCtrackid, /* Tracker id for server side tracking */ AtrnSRCtrackrate, /* Tracker max rate: float in Hz */ AtrnSRCtrackblock, /* Track at block interval: int in blocks */ AtrnABSORBfactor, /* Per source absorption factor */ AtrnSRCDEFlast }; #define SPATIAL_OFF_AUTO_GAIN 800 /* magic number to signal using automatic gain */ #define PATH_GAIN_DISABLE_PATH 800 /* magic number to signal complete disabling of a path*/ struct IdAndGain { /* for use in the data field for AtrnPATHgain */ int id; float dB; }; enum ATRNmodelEnableDef { AtrnEnableGain, AtrnDisableGain, AtrnEnableFilter, AtrnDisableFilter, AtrnEnableDelay, AtrnDisableDelay, AtrnModelEnableDeflast }; /* ====================================================================== */ /* == GAIN CLIP DISTANCE relationship: == */ /* == == */ /* == / 1 \ == */ /* == / /dB_gain\ \ |-----------------| == */ /* == | |-------| | \SPREADING_ROLLOFF/ == */ /* == | \ 20.0 / | == */ /* == clip_dist = | GAIN_RATIO * 10 | == */ /* == \ / == */ /* == == */ /* == A nominal linear gain is set to correspond to 0.0 dB == */ /* == amplification of the system dynamic range as set by == */ /* == X_amplfy_source(). The distance model applies a relative == */ /* == attenuation to the source's signal level based on the dynamic == */ /* == range gain (GAIN_RATIO scaled by dB) multiplied by the == */ /* == inverse of the ear to source distance raised to the power of == */ /* == the spreading rolloff exponent. The result of this == */ /* == relationship is that, at some small distance (the clip == */ /* == distance), the distance model attenuation goes to zero (the == */ /* == DSP filters the source signal at full input level) and shorter == */ /* == distances have no gain amplification distance cue. The == */ /* == GAIN_RATIO is set at a value that optimizes dynamic range == */ /* == versus near-field effects. == */ /* == Given GAIN_RATIO = 2.1 and SPREADING_ROLLOFF = 0.80, == */ /* == the following table gives clip distances in terms of dB, == */ /* == as set in X_amplfy_source(): == */ /* == == */ /* == _Gain_in_dB_ _Clip_Distance_ (in current units) == */ /* == -20.0 dB 0.1 == */ /* == -10.0 dB 0.6 == */ /* == -5.0 dB 1.3 == */ /* == 0.0 dB 2.5 == */ /* == 5.0 dB 5.3 == */ /* == 10.0 dB 10.9 == */ /* == 15.0 dB 22.4 == */ /* == 20.0 dB 45.9 == */ /* == 30.0 dB 193.7 == */ /* == 40.0 dB 816.7 == */ /* ====================================================================== */ #define GAIN_dB_ON 0.0f #define GAIN_dB_OFF -120.0f /* GAIN_LIMIT & GAIN_NOMINAL are implementation dependent */ #define GAIN_RATIO 2.1f #define ZERO_dB_DIST_INCHES 2.5f /* inches */ /* Interpolators Interpolators are used on input, output, and extract from delay-line. The delay-line extraction is done once for a path, concatenating all of the delays. The interpolators interpolate both the proper delay at each sample time and the sample value at that time. Note that the Linear and polyphase will quantize to whole samples when the delay stops changing. This is because the linear has audible artifacts, and the polyphase is expensive. */ enum ATRNsrcInterpTypes { AtrnSrcINTERPnone, /* quantize=yes */ AtrnSrcINTERPlinear, /* quantize=yes */ AtrnSrcINTERPpolyphase, /* quantize=yes, fixed-rate only if input/output-interpolator */ AtrnSrcINTERPlagrange3, /* quantize=no */ AtrnSrcINTERPlagrange7, /* quantize=no */ AtrnSrcINTERPlagrange15, /* quantize=no */ AtrnSrcINTERPlagrange31, /* quantize=no */ AtrnSrcINTERPdt2linear, /* quantize=no, equivalent to Lagrange1 */ AtrnSrcINTERPdt2lagrange3, /* quantize=no */ AtrnSrcINTERPdt2lagrange5, /* quantize=no */ AtrnSrcINTERPdt2lagrange7, /* quantize=no */ AtrnSrcINTERPdt2lagrange11, /* quantize=no */ AtrnSrcINTERPdt2lagrange15, /* quantize=no */ AtrnSrcINTERPdt2lagrange23, /* quantize=no */ AtrnSrcINTERPdt2lagrange31, /* quantize=no */ AtrnSrcINTERPdt2lagrange63, /* quantize=no */ AtrnSrcINTERPskipxfade, /* quantize=yes, cross-fades */ AtrnSrcINTERPlast }; /* == Enumeration of values for cre_define_source(AtrnTIMEdelay) == */ enum ATRNtimedelayDef { AtrnTDNone, /* No environment delay to direct path or reflections */ AtrnTDRelative, /* No delay for direct path, reflections relative to direct */ AtrnTDAbsolute, /* All paths have absolute delay relative to ZeroDelayDist */ AtrnTDCorrected, /* Delay correct to smaller of ZeroDelayDist and system latency */ AtrnTDLast }; /* == CRE_DEFINE_MEDIUM() ----------------------------------------------- == */ /* == Enumeration of parameter ids for cre_define_medium() == */ enum ATRNmedDef { AtrnROLLOFF, /* float exponent, nominally 1.0, typically 0.7 */ AtrnABSORBdist, /* float in current units */ AtrnHUMIDpercent, /* float 0 to 100 */ AtrnTEMPcelcius, /* float of degrees celcius */ AtrnPRESSbar, /* 1.0 is one atmosphere of air pressure */ AtrnABSORBcoef, /* 0.0 to 1.0 */ AtrnSOUNDspeed, /* float specified in units per second */ AtrnMEDmaterial, /* preset of SOS and ABSORBcoef */ AtrnLoadEnvModelDeprecated, /* No longer supported. Use LoadModel */ AtrnSetEnvModelAttrDeprecated, /* No longer supported. Use SetAttributeDouble */ AtrnEnvModelEnableDeprecated, /* No longer supported. Use EnableModel */ AtrnMEDgroundReflection, /* pts = sizeof {IdAndGaind}, data = IdAndGain, id = reflection model type, Gain = gain or parameter to model */ AtrnNUMwalls, /* pts gives the number of walls (surfaces) to have in the world */ AtrnMEDDEFlast }; #define SPREADING_ROLLOFF 0.8f /* rolloff exponent for distance model */ #define ABSORPTION_DISTANCE 60.0f /* dist (in INCHES) past which absorb filt effects */ #define EXPONENT_LIMIT 100.0f /* highest exponent accepted */ /* == Enumeration of values for cre_define_medium(AtrnMEDmaterial) == */ enum ATRNmedmatlDef { AtrnMDMTLair, AtrnMDMTLwater, AtrnMDMTLlast }; /* == RESPONSE DISTANCE: radius of HRTF measurements == */ #define RESPONSE_DISTANCE 55.12f /* 1.4 meters */ /* == For AuSIM-internal debugging purposes only == */ #define AtrnDUMPdebug 0x2D /* == CRE_DEFINE_ROUTER() ----------------------------------------------- == */ /* == Router-Definition parameter enumeration ---------------------- == */ /* -- These parameters control the routing of audio channels */ /* -- Each input to output routing is called a "patch". */ /* -- The router has no effect on audio localization. */ enum ATRNrouteDef { /* __id__ | __pts______ | __data___ */ AtrnDELpatch, /* input, output chnl, null */ AtrnADDpatch, /* input, output chnl, null */ AtrnDELpatches, /* input, num outputs, array of outputs */ AtrnADDpatches, /* input, num outputs, array of outputs */ AtrnSETrouting, /* input, num outputs, array of outputs */ AtrnCHNLactive, /* input, 0 or non-zero, null */ AtrnRTRaddress, /* router, num chars, string */ AtrnCHNLalias, /* virtual, physical, null */ AtrnRTRDEFlast }; /* == Special-Router channel modifiers ------------------------------ == */ #define AtrnROUTEcircuit 0x0100 /* ninth bit */ #define AtrnROUTEbuffer 0x0200 /* tenth bit */ #define AtrnROUTEfltrchnl 0x0400 /* eleventh bit ON, twelveth bit OFF */ #define AtrnROUTEshmchnl 0x0800 /* eleventh bit OFF, twelveth bit ON */ #define AtrnROUTEnetchnl 0x0C00 /* eleventh and twelveth bits both SET */ #define AtrnROUTEparent 0x2000 /* fourteenth (formerly thirteenth bit) */ #define AtrnROUTEchannel 0x00FF /* bottom eight bits */ #define AtrnROUTEspecial 0xFF00 /* top eight bits of bottom word */ #define CKTM_EnvVar "CKTMGRIP" /* == CRE_FETCH_XXXX() ---------------------------------------------- == */ /* By convention, all cre_fetch_xxx functions were to be local (client) only. */ /* For getting information from the server, use cre_query_xxx() functions. */ /* Current cre_fetch_xxx() are local for CRE_TRON, but reach server for CreTronUni */ /* == Enumeration of parameter msg for cre_fetch_message() == */ /* The special msg AtrnMSGHostName will be deprecated, use cre_query_system(AtrnQRYSYSname) for all new calls. */ enum ATRNfetchMessage { AtrnMSGRemote = 0x0300, /* add this to the msg ID to get remote msg */ AtrnMSGHostName = 1000 /* to be deprecated, do not use */ }; /* == Enumeration of parameter ids for cre_fetch_value() == */ /* Historically, this was called cre_detect() */ /* The following parameters are valid only for CRE_TRON calls AtrnLSTNRinit : number of listeners initialized AtrnASRCinit : number of aural sources initialized AtrnSYSunits : current system units, see ATRNunitsDef enum above */ /* The following parameters are deprecated, use cre_query_xxx AtrnFRAMErate >> query_system(AtrnQRYSYSsmplrate)/query_head(AtrnQRYHDblocksize) AtrnWAVBUFavail >> query_system(AtrnQRYSYSphysmem) AtrnJSABBIES -- no replacement yet */ enum ATRNdetectDef { AtrnLSTNRinit, /* number of listeners initialized */ AtrnASRCinit, /* number of aural sources initialized */ AtrnFRAMErate, /* rate system updates localization parameters */ AtrnSYSunits, /* current system units, see ATRNunitsDef enum above */ AtrnWAVBUFavail, /* seconds of free wavefile buffers available */ AtrnDTCDEFlast, AtrnJSABBIES = JSACOUNTS }; /* == Auto-Detection Board-Types ---------------------------- == */ /* Enumeration of return values from deprecated cre_detect() function. */ enum ATRNcardTypes { ALPHATRON, BEACHTRON }; /* == CRE_QUERY_XXXX() ---------------------------------------------- == */ /* All queries requesting a single integral type, */ /* return the value in the return code, */ /* without requiring a valid data pointer. */ enum ATRNquerySystem { AtrnQRYSYSsmplrate, /* Default or current sample rate of audio output system (32-bit float) */ AtrnQRYSYSversion, /* Engine version number (32-bit float) */ AtrnQRYSYScores, /* DAPU cores available (32-bit int) */ AtrnQRYSYSthreads, /* Threads allocated to AuSIM3D (32-bit int) */ AtrnQRYSYSconsumption, /* Core usage 0-1 (Nx 32-bit float) */ AtrnQRYSYSname, /* GoldServer name (string) */ AtrnQRYSYSphysmem, /* Physical memory free (64-bit int, use 2 32-bit ints) */ AtrnQRYSYSwavemode, /* Wave Mode 1-based (32-bit int & string) */ AtrnQRYSYSwavedev, /* Wave Device (string) */ AtrnQRYSYSinterface, /* connection to engine (32-bit int) */ AtrnQRYSYSremote, /* boolean for local/remote connection to engine (32-bit int) */ AtrnQRYSYSconnect, /* connection description to engine (string upto 64 chars) */ AtrnQRYSYSheadinit, /* total listeners initialized (32-bit int) */ AtrnQRYSYSasrcinit, /* total sound sources initialized (32-bit int) */ AtrnQRYSYSpathsgen, /* total sound paths generated (32-bit int) */ AtrnQRYSYSdistunits, /* distance units of the system (32-bit int) */ AtrnQRYSYSlast }; enum ATRNqueryHead { AtrnQRYHDpos, /* head-center XYZYwPtRl position (32-bit floats) */ AtrnQRYHDleft, /* pinnae XYZ location (32-bit floats) */ AtrnQRYHDright, /* pinnae XYZ location (32-bit floats) */ AtrnQRYHDorient, /* current Euler angles (32-bit floats) */ AtrnQRYHDsize, /* (-) geometric interaural size in current units (32-bit float) */ AtrnQRYHDahm, /* current AHM identifier (character string) */ AtrnQRYHDresolve, /* (-) filter order trim (integer) */ AtrnQRYHDmodel, /* (-) near, far, mixed (integer) */ AtrnQRYHDgain, /* (-) final output gain (32-bit float) */ AtrnQRYHDdisplay, /* (-) final display equalization type (integer) */ AtrnQRYHDaxis1, /* (-) axis detail: min, start, interval, stop, max (32-bit floats) */ AtrnQRYHDaxis2, /* (-) axis detail: min, start, interval, stop, max (32-bit floats) */ AtrnQRYHDaxis3, /* (-) axis detail: min, start, interval, stop, max (32-bit floats) */ AtrnQRYHDtrack, /* head-center XYZYwPtRl tracker data (32-bit floats) */ AtrnQRYHDeqf, /* current EQF identifier (character string) */ AtrnQRYHDskipped, /* Number of output buffers that have been skipped */ AtrnQRYHDskippedreset, /* Number skipped and then resets the count */ AtrnQRYHDblocksize, /* Size in samples of of the engine block size */ AtrnQRYHDproctype, /* Head processing type */ AtrnQRYHDnumbuffers, /* Number of IO Audio buffers available */ AtrnQRYHDcurrbufdepth, /* Current buffer depth showing how many buffers are used */ AtrnQRYHDmaxbufdepth, /* Maximum number of buffers used */ AtrnQRYHDnumsinks, /* Number of sinks for the indicated listener */ AtrnQRYHDlevel, /* Instantaneous decibel level (32-bit float) for each sink */ AtrnQRYHDbufferstats, /* Buffers available, current depth, and max depth (3x 32-bit integers) */ AtrnQRYHDlast }; enum ATRNquerySource { AtrnQRYSRCradpts, /* (-) radiation profile points in use (integer) */ AtrnQRYSRCradpfl, /* (-) radiation profile data (32-bit floats) */ AtrnQRYSRCspatial, /* (-) spatialization enabled: 0 or 1 (integer) */ AtrnQRYSRChdlink, /* (-) listener identifier, -1 == UNLINKED (integer) */ AtrnQRYSRCrolloff, /* (-) spreading rolloff exponent (32-bit float) */ AtrnQRYSRCgndist, /* (-) 0dB distance in current units (32-bit float) */ AtrnQRYSRCchnl, /* (-) input channel for source (integer) */ AtrnQRYSRCdoppler, /* (-) Doppler factor for this source (32-bit float) */ AtrnQRYSRCpos, /* source-center XYZYwPtRl final position (32-bit floats) */ AtrnQRYSRCtrack, /* source-center XYZYwPtRl tracker data (32-bit floats) */ AtrnQRYSRClevel, /* instantaneous source signal level at time of query (32-bit float) */ AtrnQRYSRClast }; enum ATRNqueryMedium { AtrnQRYMEDrolloff, /* spreading rolloff exponent (32-bit float) */ AtrnQRYMEDabsorb, /* absorption distance (32-bit float) */ AtrnQRYMEDhumid, /* humidity percent (32-bit float) */ AtrnQRYMEDtemp, /* temperature celcius (32-bit float) */ AtrnQRYMEDpress, /* pressure in bar (100,000 Pascals) (32-bit float) */ AtrnQRYMEDmatl, /* material coefficient (32-bit float) */ AtrnQRYMEDlast }; enum ATRNqueryRouter { /* __id___ | __pts_________ | __data___ */ AtrnQRYRTRaddress, /* router address (4 integers) */ AtrnQRYRTRpatches, /* all patches for given input (integers) */ /* input | array size | int array of outpus */ AtrnQRYRTRinputs, /* all inputs patched to given output (integers) */ /* output | array size | int array of inputs */ AtrnQRYRTRactive, /* all active outputs for given input (integers) */ AtrnQRYRTRalias, /* physical alias for given virtual channel (integer) */ AtrnQRYRTRnumpatches, /* number of patches for given input */ /* input | array size = 1 | int array for number */ AtrnQRYRTRnumoutputpatches, /* number of patches to given output */ /* output | array size = 1 | int array for number */ AtrnQRYRTRnuminputs, /* number of input channels */ /* ignored | array size = 1 | int array for number */ AtrnQRYRTRinputlist, /* list of input channels (integers) */ /* ignored | array size | int array of inputs */ AtrnQRYRTRnumoutputs, /* number of output channels */ /* ignored | array size = 1 | int array for number */ AtrnQRYRTRoutputlist, /* list of output channels (integers) */ /* ignored | array size | int array of inputs */ AtrnQRYRTRinputname, /* string name of an input channel */ /* input | num chars | string */ AtrnQRYRTRoutputname, /* string name of an output channel */ /* output | num chars | string */ AtrnQRYRTRlast }; /* == Overriding ENVironment VARiables == */ /* == Defaults: == */ /* == TRONBIN == HRTF == "." (current directory) == */ /* == TRONAHM == DFT_AHM_MAP == */ #define TRON_EnvVar "TRONBIN" /* directory for all DSP binaries */ #define ACOM_EnvVar "TRONCOM" /* ATRON client I/O configuration */ #define HRTF_EnvVar "HRTF" /* directory for all HRTFs */ #define AHMN_EnvVar "TRONAHM" /* name of head */ #define ADEV_EnvVar "TRONDEV" /* device file */ #define EQFN_EnvVar "TRONEQF" /* path to default EQF */ #define EQFP_EnvVar "EQFDIR" /* path to EQF root, filename ignored */ #define AFMP_EnvVar "AFMDIR" /* path to AFM root, filename ignored */ #define EVLP_EnvVar "EVLDIR" /* path to EVL root, filename ignored */ #define MPIP_EnvVar "MPIDIR" /* path to PlugIn root, filename ignored */ /* The following 4 letter string is the prefix for the HRTF name. */ /* The 4 letter suffix is defined by the macros xxx_MAPTYPE, */ /* defined in xTRON.H and where "xxx" is the driver name. */ #define DFT_AHM_MAP "SLV" /* default HRTF name prefix */ #define DFT_AHM_EXT ".AHM" /* default HRTF file extension */ #define DFT_EQF_EXT ".EQF" /* default EQF file extension */ #define DFT_AFM_EXT ".AFM" /* default AFM file extension */ #define DFT_EVL_EXT ".EVL" /* default EVL file extension */ #define DFT_EQF_FILTER "Default" /* default EQF filename without extension */ /* == Indices of the _tron_error[] array. == */ enum TronErrorId { ErrorCODE, /* error summary */ ErrorLodVAL, /* DSP load fail */ ErrorTnmVAL, /* TRON malloc */ ErrorCtmVAL, /* CTRL malloc */ ErrorDrmVAL, /* DRVR malloc */ ErrorAsmVAL, /* ASRC malloc */ ErrorHdmVAL, /* HEAD malloc */ ErrorDpmVAL, /* DPLR malloc */ ErrorMtmVAL, /* MATL malloc */ ErrorPcmVAL, /* PATC malloc */ ErrorSfmVAL, /* SURF malloc */ ErrorLAST }; /* == Bit markers of the _tron_error[ErrorCODE] value. == */ enum TronERROR { TE_NO_ERROR = 0, TE_INIT_OFLO = 1, TE_LOAD_FAIL = 1< #endif #endif #define Pi 3.1415926535897932384626433832795 #define Pi2 6.283185307179586476925286766559 #ifndef M_PI #define M_PI Pi #define M_PI_2 (Pi*0.5) #define M_1_PI (1/Pi) #define M_2_PI (2/Pi) #endif /* small round-off error definitions */ #define EPSILON 0.01 #define _EPSILON 0.0001 #define _epsilon 0.00000001 #define f_epsilon 1.192092896e-07F /* precision of a float */ /* radian defs */ #define QUADRANT M_PI_2 #define RADS2DGRS (180/M_PI) #define RADS2DEGS (180/M_PI) #define DEGS2RADS (M_PI/180.0) #define DGRS2RADS (M_PI/180.0) /* axis defs */ #define XAXIS 0 #define YAXIS 1 #define ZAXIS 2 #endif /* == Integer status return values == */ #ifndef Ok #define Ok 1 #define Error0 0 #define Error1 -1 #define Error2 -2 #define Error3 -3 #define Error4 -4 #define Error5 -5 #define Error6 -6 #define Error7 -7 #define Error8 -8 #define Error9 -9 #define Error10 10 #define Error11 -11 #define Error12 -12 #define Error13 -13 #define Error14 -14 #define Error15 -15 #define Error16 -16 #define Error17 -17 #define Error18 -18 #define Error19 -19 #define Error20 -20 #define Error21 -21 #define Error22 -22 #define Error23 -23 #endif #ifndef TRUE #define FALSE 0 #define TRUE (!FALSE) #endif #ifndef ON #define OFF 0 #define ON (~OFF) #endif #ifdef WE_REALLY_NEED_THESE_OLD_CRE_HARDWARE_DEFS /* == Hardware/Driver limitations == */ #define MAX_CTRONS 8 #define MAX_BTRONS 8 #define MAX_TRONS 15 /* 8 CTRONS + 7 BTRONS */ #define MAXI_SRCS 4 #define ARS2_SRCS 1 #define ARS3_SRCS 1 #define BMP1_SRCS 2 #define BMP2_SRCS 6 #define BMP3_SRCS 2 #define BMP4_SRCS 4 #define CMP1_SRCS 4 #define DPL1_SRCS 1 #define CTRON_SRCS 4 #define CTRON_BEST_CHNL 2 /* cleanest Convolvotron ADC */ /* == CRE_TRON imposed resource limits == */ #define MAX_SURFS 6 /* AcousticSurfaces: Hardware limited */ #define MAX_PTCHS 1 /* MaterialPatches: One patch / surf now. */ #define MAX_MATLS 8 /* AcousticMaterials: No limit */ #define MAX_PMATS 3 /* PaletteMaterials: Hardware limited */ #define MAX_DRVRS AtrnLASTdriver /* DSP Drivers */ #define MAX_DPLRS 22 /* Doppler: 8 Spectrum C25's + 7 MultiSounds */ #define ALL_TRONS -1 #ifndef FILTERENUM #define FILTERENUM /* == Atron Finite Impulse Response filter ID's == */ /* == these are used to label the type of individual filter == */ /* == or label a block of filters. == */ /* == see tron_filter(). == */ enum ATRNfilter { AFIR_HRTF, AFIR_LPOL, AFIR_RPOL, AFIR_LEFT, AFIR_RGHT, AFIR_RFLT, AFIR_TRAN, AFIR_LAST }; #endif #endif /* WE_REALLY_NEED_THESE_OLD_CRE_HARDWARE_DEFS */