Hauptseite   Klassenhierarchie   Übersicht   Auflistung der Dateien   Datenstruktur-Elemente   Datei-Elemente  

fmod.h

00001 /* ========================================================================================== */
00002 /* FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd 1999-2003.           */
00003 /* ========================================================================================== */
00004 
00005 #ifndef _FMOD_H_
00006 #define _FMOD_H_
00007 
00008 /* ========================================================================================== */
00009 /* DEFINITIONS                                                                                */
00010 /* ========================================================================================== */
00011 
00012 #if (!defined(WIN32) && !defined(__WIN32__) && !defined(_WIN32_WCE)) || (defined(__GNUC__) && defined(WIN32))
00013     #ifndef __cdecl
00014         #define __cdecl
00015     #endif
00016     #ifndef __stdcall
00017         #define __stdcall
00018     #endif
00019 #endif 
00020 #if defined(_WIN32_WCE)
00021     #define F_API _stdcall
00022     #define F_CALLBACKAPI _cdecl
00023 #else
00024     #define F_API __stdcall
00025     #define F_CALLBACKAPI __cdecl
00026 #endif
00027 
00028 #ifdef DLL_EXPORTS
00029     #define DLL_API __declspec(dllexport)
00030 #else
00031     #if defined(__LCC__) || defined(__MINGW32__) || defined(__CYGWIN32__)
00032         #define DLL_API F_API
00033     #else
00034         #define DLL_API
00035     #endif /* __LCC__ ||  __MINGW32__ || __CYGWIN32__ */
00036 #endif /* DLL_EXPORTS */
00037 
00038 #define FMOD_VERSION    3.62f
00039 
00040 /* 
00041     FMOD defined types 
00042 */
00043 typedef struct FSOUND_SAMPLE    FSOUND_SAMPLE;
00044 typedef struct FSOUND_STREAM    FSOUND_STREAM;
00045 typedef struct FSOUND_DSPUNIT   FSOUND_DSPUNIT;
00046 typedef struct FMUSIC_MODULE    FMUSIC_MODULE;
00047 
00048 /* 
00049     Callback types
00050 */
00051 typedef void *      (F_CALLBACKAPI *FSOUND_DSPCALLBACK)    (void *originalbuffer, void *newbuffer, int length, int param);
00052 typedef signed char (F_CALLBACKAPI *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, int param);
00053 typedef void        (F_CALLBACKAPI *FMUSIC_CALLBACK)       (FMUSIC_MODULE *mod, unsigned char param);
00054 
00055 typedef unsigned int(F_CALLBACKAPI *FSOUND_OPENCALLBACK)   (const char *name);
00056 typedef void        (F_CALLBACKAPI *FSOUND_CLOSECALLBACK)  (unsigned int handle);
00057 typedef int         (F_CALLBACKAPI *FSOUND_READCALLBACK)   (void *buffer, int size, unsigned int handle);
00058 typedef int         (F_CALLBACKAPI *FSOUND_SEEKCALLBACK)   (unsigned int handle, int pos, signed char mode);
00059 typedef int         (F_CALLBACKAPI *FSOUND_TELLCALLBACK)   (unsigned int handle);
00060 
00061 typedef void *      (F_CALLBACKAPI *FSOUND_ALLOCCALLBACK)  (unsigned int size);
00062 typedef void *      (F_CALLBACKAPI *FSOUND_REALLOCCALLBACK)(void *ptr, unsigned int size);
00063 typedef void        (F_CALLBACKAPI *FSOUND_FREECALLBACK)   (void *ptr);
00064 
00065 
00066 /*
00067 [ENUM]
00068 [
00069     [DESCRIPTION]   
00070     On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
00071     
00072     [SEE_ALSO]      
00073     FSOUND_GetError
00074 ]
00075 */
00076 enum FMOD_ERRORS 
00077 {
00078     FMOD_ERR_NONE,             /* No errors */
00079     FMOD_ERR_BUSY,             /* Cannot call this command after FSOUND_Init.  Call FSOUND_Close first. */
00080     FMOD_ERR_UNINITIALIZED,    /* This command failed because FSOUND_Init or FSOUND_SetOutput was not called */
00081     FMOD_ERR_INIT,             /* Error initializing output device. */
00082     FMOD_ERR_ALLOCATED,        /* Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */
00083     FMOD_ERR_PLAY,             /* Playing the sound failed. */
00084     FMOD_ERR_OUTPUT_FORMAT,    /* Soundcard does not support the features needed for this soundsystem (16bit stereo output) */
00085     FMOD_ERR_COOPERATIVELEVEL, /* Error setting cooperative level for hardware. */
00086     FMOD_ERR_CREATEBUFFER,     /* Error creating hardware sound buffer. */
00087     FMOD_ERR_FILE_NOTFOUND,    /* File not found */
00088     FMOD_ERR_FILE_FORMAT,      /* Unknown file format */
00089     FMOD_ERR_FILE_BAD,         /* Error loading file */
00090     FMOD_ERR_MEMORY,           /* Not enough memory or resources */
00091     FMOD_ERR_VERSION,          /* The version number of this file format is not supported */
00092     FMOD_ERR_INVALID_PARAM,    /* An invalid parameter was passed to this function */
00093     FMOD_ERR_NO_EAX,           /* Tried to use an EAX command on a non EAX enabled channel or output. */
00094     FMOD_ERR_CHANNEL_ALLOC,    /* Failed to allocate a new channel */
00095     FMOD_ERR_RECORD,           /* Recording is not supported on this machine */
00096     FMOD_ERR_MEDIAPLAYER,      /* Windows Media Player not installed so cannot play wma or use internet streaming. */
00097     FMOD_ERR_CDDEVICE          /* An error occured trying to open the specified CD device */
00098 };
00099 
00100 
00101 /*
00102 [ENUM]
00103 [
00104     [DESCRIPTION]   
00105     These output types are used with FSOUND_SetOutput, to choose which output driver to use.
00106     
00107     FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver 
00108     does not support DirectX 6 Voice Manager Extensions.
00109 
00110     FSOUND_OUTPUT_WINMM is recommended for NT and CE.
00111 
00112     [SEE_ALSO]      
00113     FSOUND_SetOutput
00114     FSOUND_GetOutput
00115 ]
00116 */
00117 enum FSOUND_OUTPUTTYPES
00118 {
00119     FSOUND_OUTPUT_NOSOUND,    /* NoSound driver, all calls to this succeed but do nothing. */
00120     FSOUND_OUTPUT_WINMM,      /* Windows Multimedia driver. */
00121     FSOUND_OUTPUT_DSOUND,     /* DirectSound driver.  You need this to get EAX2 or EAX3 support, or FX api support. */
00122     FSOUND_OUTPUT_A3D,        /* A3D driver. */
00123 
00124     FSOUND_OUTPUT_OSS,        /* Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers. */
00125     FSOUND_OUTPUT_ESD,        /* Linux/Unix ESD (Enlightment Sound Daemon) driver. */
00126     FSOUND_OUTPUT_ALSA,       /* Linux Alsa driver. */
00127 
00128     FSOUND_OUTPUT_ASIO,       /* Low latency ASIO driver */
00129     FSOUND_OUTPUT_XBOX,       /* Xbox driver */
00130     FSOUND_OUTPUT_PS2,        /* PlayStation 2 driver */
00131     FSOUND_OUTPUT_MAC,        /* Mac SoundManager driver */
00132     FSOUND_OUTPUT_GC,         /* Gamecube driver */
00133 
00134     FSOUND_OUTPUT_NOSOUND_NONREALTIME   /* This is the same as nosound, but the sound generation is driven by FSOUND_Update */
00135 };
00136 
00137 
00138 /*
00139 [ENUM]
00140 [
00141     [DESCRIPTION]   
00142     These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act 
00143     upon for other reasons using FSOUND_GetMixer.
00144     It is not nescessary to set the mixer.  FMOD will autodetect the best mixer for you.
00145 
00146     [SEE_ALSO]      
00147     FSOUND_SetMixer
00148     FSOUND_GetMixer
00149 ]
00150 */
00151 enum FSOUND_MIXERTYPES
00152 {
00153     FSOUND_MIXER_AUTODETECT,        /* CE/PS2/GC Only - Non interpolating/low quality mixer. */
00154     FSOUND_MIXER_BLENDMODE,         /* Removed / obsolete. */
00155     FSOUND_MIXER_MMXP5,             /* Removed / obsolete. */
00156     FSOUND_MIXER_MMXP6,             /* Removed / obsolete. */
00157 
00158     FSOUND_MIXER_QUALITY_AUTODETECT,/* All platforms - Autodetect the fastest quality mixer based on your cpu. */
00159     FSOUND_MIXER_QUALITY_FPU,       /* Win32/Linux only - Interpolating/volume ramping FPU mixer.  */
00160     FSOUND_MIXER_QUALITY_MMXP5,     /* Win32/Linux only - Interpolating/volume ramping P5 MMX mixer.  */
00161     FSOUND_MIXER_QUALITY_MMXP6,     /* Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer. */
00162 
00163     FSOUND_MIXER_MONO,              /* CE/PS2/GC only - MONO non interpolating/low quality mixer. For speed*/
00164     FSOUND_MIXER_QUALITY_MONO,      /* CE/PS2/GC only - MONO Interpolating mixer.  For speed */
00165 
00166     FSOUND_MIXER_MAX
00167 };
00168 
00169 
00170 /*
00171 [ENUM]
00172 [
00173     [DESCRIPTION]   
00174     These definitions describe the type of song being played.
00175 
00176     [SEE_ALSO]      
00177     FMUSIC_GetType  
00178 ]
00179 */
00180 enum FMUSIC_TYPES
00181 {
00182     FMUSIC_TYPE_NONE,       
00183     FMUSIC_TYPE_MOD,        /* Protracker / Fasttracker */
00184     FMUSIC_TYPE_S3M,        /* ScreamTracker 3 */
00185     FMUSIC_TYPE_XM,         /* FastTracker 2 */
00186     FMUSIC_TYPE_IT,         /* Impulse Tracker. */
00187     FMUSIC_TYPE_MIDI,       /* MIDI file */
00188     FMUSIC_TYPE_FSB         /* FMOD Sample Bank file */
00189 };
00190 
00191 
00192 /*
00193 [DEFINE_START] 
00194 [
00195     [NAME] 
00196     FSOUND_DSP_PRIORITIES
00197 
00198     [DESCRIPTION]   
00199     These default priorities are used by FMOD internal system DSP units.  They describe the 
00200     position of the DSP chain, and the order of how audio processing is executed.
00201     You can actually through the use of FSOUND_DSP_GetxxxUnit (where xxx is the name of the DSP
00202     unit), disable or even change the priority of a DSP unit.
00203 
00204     [SEE_ALSO]      
00205     FSOUND_DSP_Create
00206     FSOUND_DSP_SetPriority
00207     FSOUND_DSP_GetSpectrum
00208 ]
00209 */
00210 #define FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT        0       /* DSP CLEAR unit - done first */
00211 #define FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT          100     /* DSP SFX unit - done second */
00212 #define FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT        200     /* DSP MUSIC unit - done third */
00213 #define FSOUND_DSP_DEFAULTPRIORITY_USER             300     /* User priority, use this as reference for your own DSP units */
00214 #define FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT          900     /* This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units */
00215 #define FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT  1000    /* DSP CLIP AND COPY unit - last */
00216 /* [DEFINE_END] */
00217 
00218 
00219 /*
00220 [DEFINE_START] 
00221 [
00222     [NAME] 
00223     FSOUND_CAPS
00224 
00225     [DESCRIPTION]   
00226     Driver description bitfields.  Use FSOUND_Driver_GetCaps to determine if a driver enumerated
00227     has the settings you are after.  The enumerated driver depends on the output mode, see
00228     FSOUND_OUTPUTTYPES
00229 
00230     [SEE_ALSO]
00231     FSOUND_GetDriverCaps
00232     FSOUND_OUTPUTTYPES
00233 ]
00234 */
00235 #define FSOUND_CAPS_HARDWARE                0x1     /* This driver supports hardware accelerated 3d sound. */
00236 #define FSOUND_CAPS_EAX2                    0x2     /* This driver supports EAX 2 reverb */
00237 #define FSOUND_CAPS_EAX3                    0x10    /* This driver supports EAX 3 reverb */
00238 /* [DEFINE_END] */
00239 
00240 
00241 /*
00242 [DEFINE_START] 
00243 [
00244     [NAME] 
00245     FSOUND_MODES
00246     
00247     [DESCRIPTION]   
00248     Sample description bitfields, OR them together for loading and describing samples.
00249     NOTE.  If the file format being loaded already has a defined format, such as WAV or MP3, then 
00250     trying to override the pre-defined format with a new set of format flags will not work.  For
00251     example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS.  It will just
00252     ignore the flag and go ahead loading it as 8bits.  For these type of formats the only flags
00253     you can specify that will really alter the behaviour of how it is loaded, are the following.
00254 
00255     FSOUND_LOOP_OFF     
00256     FSOUND_LOOP_NORMAL  
00257     FSOUND_LOOP_BIDI    
00258     FSOUND_HW3D
00259     FSOUND_2D
00260     FSOUND_STREAMABLE   
00261     FSOUND_LOADMEMORY   
00262     FSOUND_LOADRAW          
00263     FSOUND_MPEGACCURATE     
00264 
00265     See flag descriptions for what these do.
00266 ]
00267 */
00268 #define FSOUND_LOOP_OFF     0x00000001  /* For non looping samples. */
00269 #define FSOUND_LOOP_NORMAL  0x00000002  /* For forward looping samples. */
00270 #define FSOUND_LOOP_BIDI    0x00000004  /* For bidirectional looping samples.  (no effect if in hardware). */
00271 #define FSOUND_8BITS        0x00000008  /* For 8 bit samples. */
00272 #define FSOUND_16BITS       0x00000010  /* For 16 bit samples. */
00273 #define FSOUND_MONO         0x00000020  /* For mono samples. */
00274 #define FSOUND_STEREO       0x00000040  /* For stereo samples. */
00275 #define FSOUND_UNSIGNED     0x00000080  /* For user created source data containing unsigned samples. */
00276 #define FSOUND_SIGNED       0x00000100  /* For user created source data containing signed data. */
00277 #define FSOUND_DELTA        0x00000200  /* For user created source data stored as delta values. */
00278 #define FSOUND_IT214        0x00000400  /* For user created source data stored using IT214 compression. */
00279 #define FSOUND_IT215        0x00000800  /* For user created source data stored using IT215 compression. */
00280 #define FSOUND_HW3D         0x00001000  /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
00281 #define FSOUND_2D           0x00002000  /* Tells software (not hardware) based sample not to be included in 3d processing. */
00282 #define FSOUND_STREAMABLE   0x00004000  /* For a streamimg sound where you feed the data to it. */
00283 #define FSOUND_LOADMEMORY   0x00008000  /* "name" will be interpreted as a pointer to data for streaming and samples. */
00284 #define FSOUND_LOADRAW      0x00010000  /* Will ignore file format and treat as raw pcm. */
00285 #define FSOUND_MPEGACCURATE 0x00020000  /* For FSOUND_Stream_OpenFile - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime.  WARNING, see FSOUND_Stream_OpenFile for inital opening time performance issues. */
00286 #define FSOUND_FORCEMONO    0x00040000  /* For forcing stereo streams and samples to be mono - needed if using FSOUND_HW3D and stereo data - incurs a small speed hit for streams */
00287 #define FSOUND_HW2D         0x00080000  /* 2D hardware sounds.  allows hardware specific effects */
00288 #define FSOUND_ENABLEFX     0x00100000  /* Allows DX8 FX to be played back on a sound.  Requires DirectX 8 - Note these sounds cannot be played more than once, be 8 bit, be less than a certain size, or have a changing frequency */
00289 #define FSOUND_MPEGHALFRATE 0x00200000  /* For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution */
00290 #define FSOUND_XADPCM       0x00400000  /* For XBOX only - Contents are compressed as XADPCM  */
00291 #define FSOUND_VAG          0x00800000  /* For PS2 only - Contents are compressed as Sony VAG format */
00292 #define FSOUND_NONBLOCKING  0x01000000  /* For FSOUND_Stream_OpenFile - Causes stream to open in the background and not block the foreground app - stream functions only work when ready.  Poll any stream function determine when it IS ready. */
00293 #define FSOUND_GCADPCM      0x02000000  /* For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format */
00294 #define FSOUND_MULTICHANNEL 0x04000000  /* For PS2 only - Contents are interleaved into a multi-channel (more than stereo) format */
00295 #define FSOUND_USECORE0     0x08000000  /* For PS2 only - Sample/Stream is forced to use hardware voices 00-23 */
00296 #define FSOUND_USECORE1     0x10000000  /* For PS2 only - Sample/Stream is forced to use hardware voices 24-47 */
00297 
00298 
00299 #define FSOUND_NORMAL       (FSOUND_16BITS | FSOUND_SIGNED | FSOUND_MONO)      
00300 /* [DEFINE_END] */
00301 
00302 
00303 
00304 /*
00305 [DEFINE_START] 
00306 [
00307     [NAME] 
00308     FSOUND_CDPLAYMODES
00309     
00310     [DESCRIPTION]   
00311     Playback method for a CD Audio track, with FSOUND_CD_SetPlayMode
00312 
00313     [SEE_ALSO]    
00314     FSOUND_CD_SetPlayMode  
00315     FSOUND_CD_Play
00316 ]
00317 */
00318 #define FSOUND_CD_PLAYCONTINUOUS    0   /* Starts from the current track and plays to end of CD. */
00319 #define FSOUND_CD_PLAYONCE          1   /* Plays the specified track then stops. */
00320 #define FSOUND_CD_PLAYLOOPED        2   /* Plays the specified track looped, forever until stopped manually. */
00321 #define FSOUND_CD_PLAYRANDOM        3   /* Plays tracks in random order */
00322 /* [DEFINE_END] */
00323 
00324 
00325 /*
00326 [DEFINE_START] 
00327 [
00328     [NAME] 
00329     FSOUND_MISC_VALUES
00330     
00331     [DESCRIPTION]
00332     Miscellaneous values for FMOD functions.
00333 
00334     [SEE_ALSO]
00335     FSOUND_PlaySound
00336     FSOUND_PlaySoundEx
00337     FSOUND_Sample_Alloc
00338     FSOUND_Sample_Load
00339     FSOUND_SetPan
00340 ]
00341 */
00342 #define FSOUND_FREE             -1      /* value to play on any free channel, or to allocate a sample in a free sample slot. */
00343 #define FSOUND_UNMANAGED        -2      /* value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot. */
00344 #define FSOUND_ALL              -3      /* for a channel index , this flag will affect ALL channels available!  Not supported by every function. */
00345 #define FSOUND_STEREOPAN        -1      /* value for FSOUND_SetPan so that stereo sounds are not played at half volume.  See FSOUND_SetPan for more on this. */
00346 #define FSOUND_SYSTEMCHANNEL    -1000   /* special 'channel' ID for all channel based functions that want to alter the global FSOUND software mixing output channel */
00347 #define FSOUND_SYSTEMSAMPLE     -1000   /* special 'sample' ID for all sample based functions that want to alter the global FSOUND software mixing output sample */
00348 
00349 /* [DEFINE_END] */
00350 
00351 
00352 /*
00353 [STRUCTURE] 
00354 [
00355     [DESCRIPTION]
00356     Structure defining a reverb environment.
00357     For more indepth descriptions of the reverb properties under win32, please see the EAX2 and EAX3
00358     documentation at http://developer.creative.com/ under the 'downloads' section.
00359     If they do not have the EAX3 documentation, then most information can be attained from
00360     the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of 
00361     EAX2.
00362     Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
00363     Note that integer values that typically range from -10,000 to 1000 are represented in 
00364     decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
00365     PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).  
00366     Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
00367     the reverb should product a similar effect on either platform.
00368     Only Win32 supports the reverb api.
00369     
00370     The numerical values listed below are the maximum, minimum and default values for each variable respectively.
00371 
00372     [SEE_ALSO]
00373     FSOUND_Reverb_SetProperties
00374     FSOUND_Reverb_GetProperties
00375     FSOUND_REVERB_PRESETS
00376     FSOUND_REVERB_FLAGS
00377 ]
00378 */
00379 typedef struct _FSOUND_REVERB_PROPERTIES /* MIN     MAX    DEFAULT   DESCRIPTION */
00380 {                                   
00381     unsigned int Environment;            /* 0     , 25    , 0      , sets all listener properties (win32/ps2 only) */
00382     float        EnvSize;                /* 1.0   , 100.0 , 7.5    , environment size in meters (win32 only) */
00383     float        EnvDiffusion;           /* 0.0   , 1.0   , 1.0    , environment diffusion (win32/xbox) */
00384     int          Room;                   /* -10000, 0     , -1000  , room effect level (at mid frequencies) (win32/xbox/ps2) */
00385     int          RoomHF;                 /* -10000, 0     , -100   , relative room effect level at high frequencies (win32/xbox) */
00386     int          RoomLF;                 /* -10000, 0     , 0      , relative room effect level at low frequencies (win32 only) */
00387     float        DecayTime;              /* 0.1   , 20.0  , 1.49   , reverberation decay time at mid frequencies (win32/xbox) */
00388     float        DecayHFRatio;           /* 0.1   , 2.0   , 0.83   , high-frequency to mid-frequency decay time ratio (win32/xbox) */
00389     float        DecayLFRatio;           /* 0.1   , 2.0   , 1.0    , low-frequency to mid-frequency decay time ratio (win32 only) */
00390     int          Reflections;            /* -10000, 1000  , -2602  , early reflections level relative to room effect (win32/xbox) */
00391     float        ReflectionsDelay;       /* 0.0   , 0.3   , 0.007  , initial reflection delay time (win32/xbox) */
00392     float        ReflectionsPan[3];      /*       ,       , [0,0,0], early reflections panning vector (win32 only) */
00393     int          Reverb;                 /* -10000, 2000  , 200    , late reverberation level relative to room effect (win32/xbox) */
00394     float        ReverbDelay;            /* 0.0   , 0.1   , 0.011  , late reverberation delay time relative to initial reflection (win32/xbox) */
00395     float        ReverbPan[3];           /*       ,       , [0,0,0], late reverberation panning vector (win32 only) */
00396     float        EchoTime;               /* .075  , 0.25  , 0.25   , echo time (win32 only) */
00397     float        EchoDepth;              /* 0.0   , 1.0   , 0.0    , echo depth (win32 only) */
00398     float        ModulationTime;         /* 0.04  , 4.0   , 0.25   , modulation time (win32 only) */
00399     float        ModulationDepth;        /* 0.0   , 1.0   , 0.0    , modulation depth (win32 only) */
00400     float        AirAbsorptionHF;        /* -100  , 0.0   , -5.0   , change in level per meter at high frequencies (win32 only) */
00401     float        HFReference;            /* 1000.0, 20000 , 5000.0 , reference high frequency (hz) (win32/xbox) */
00402     float        LFReference;            /* 20.0  , 1000.0, 250.0  , reference low frequency (hz) (win32 only) */
00403     float        RoomRolloffFactor;      /* 0.0   , 10.0  , 0.0    , like FSOUND_3D_SetRolloffFactor but for room effect (win32/xbox) */
00404     float        Diffusion;              /* 0.0   , 100.0 , 100.0  , Value that controls the echo density in the late reverberation decay. (xbox only) */
00405     float        Density;                /* 0.0   , 100.0 , 100.0  , Value that controls the modal density in the late reverberation decay (xbox only) */
00406     unsigned int Flags;                  /* FSOUND_REVERB_FLAGS - modifies the behavior of above properties (win32/ps2 only) */
00407 } FSOUND_REVERB_PROPERTIES;
00408 
00409 
00410 /*
00411 [DEFINE_START] 
00412 [
00413     [NAME] 
00414     FSOUND_REVERB_FLAGS
00415     
00416     [DESCRIPTION]
00417     Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
00418 
00419     [SEE_ALSO]
00420     FSOUND_REVERB_PROPERTIES
00421 ]
00422 */
00423 #define FSOUND_REVERB_FLAGS_DECAYTIMESCALE        0x00000001 /* 'EnvSize' affects reverberation decay time */
00424 #define FSOUND_REVERB_FLAGS_REFLECTIONSSCALE      0x00000002 /* 'EnvSize' affects reflection level */
00425 #define FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE 0x00000004 /* 'EnvSize' affects initial reflection delay time */
00426 #define FSOUND_REVERB_FLAGS_REVERBSCALE           0x00000008 /* 'EnvSize' affects reflections level */
00427 #define FSOUND_REVERB_FLAGS_REVERBDELAYSCALE      0x00000010 /* 'EnvSize' affects late reverberation delay time */
00428 #define FSOUND_REVERB_FLAGS_DECAYHFLIMIT          0x00000020 /* AirAbsorptionHF affects DecayHFRatio */
00429 #define FSOUND_REVERB_FLAGS_ECHOTIMESCALE         0x00000040 /* 'EnvSize' affects echo time */
00430 #define FSOUND_REVERB_FLAGS_MODULATIONTIMESCALE   0x00000080 /* 'EnvSize' affects modulation time */
00431 #define FSOUND_REVERB_FLAGS_CORE0                 0x00000100 /* PS2 Only - Reverb is applied to CORE0 (hw voices 0-23) */
00432 #define FSOUND_REVERB_FLAGS_CORE1                 0x00000200 /* PS2 Only - Reverb is applied to CORE1 (hw voices 24-47) */
00433 #define FSOUND_REVERB_FLAGS_DEFAULT              (FSOUND_REVERB_FLAGS_DECAYTIMESCALE |        \
00434                                                   FSOUND_REVERB_FLAGS_REFLECTIONSSCALE |      \
00435                                                   FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE | \
00436                                                   FSOUND_REVERB_FLAGS_REVERBSCALE |           \
00437                                                   FSOUND_REVERB_FLAGS_REVERBDELAYSCALE |      \
00438                                                   FSOUND_REVERB_FLAGS_DECAYHFLIMIT |          \
00439                                                   FSOUND_REVERB_FLAGS_CORE0 |                 \
00440                                                   FSOUND_REVERB_FLAGS_CORE1 )
00441 /* [DEFINE_END] */
00442 
00443 
00444 
00445 
00446 /*
00447 [DEFINE_START] 
00448 [
00449     [NAME] 
00450     FSOUND_REVERB_PRESETS
00451     
00452     [DESCRIPTION]   
00453     A set of predefined environment PARAMETERS, created by Creative Labs
00454     These are used to initialize an FSOUND_REVERB_PROPERTIES structure statically.
00455     ie 
00456     FSOUND_REVERB_PROPERTIES prop = FSOUND_PRESET_GENERIC;
00457 
00458     [SEE_ALSO]
00459     FSOUND_Reverb_SetProperties
00460 ]
00461 */
00462 /*                                     Env  Size    Diffus  Room   RoomHF  RmLF DecTm   DecHF  DecLF   Refl  RefDel  RefPan               Revb  RevDel  ReverbPan           EchoTm  EchDp  ModTm  ModDp  AirAbs  HFRef    LFRef  RRlOff Diffus  Densty  FLAGS */
00463 #define FSOUND_PRESET_OFF              {0,      7.5f,   1.00f, -10000, -10000, 0,   1.00f,  1.00f, 1.0f,  -2602, 0.007f, { 0.0f,0.0f,0.0f },   200, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,   0.0f,   0.0f, 0x33f }
00464 #define FSOUND_PRESET_GENERIC          {0,      7.5f,   1.00f, -1000,  -100,   0,   1.49f,  0.83f, 1.0f,  -2602, 0.007f, { 0.0f,0.0f,0.0f },   200, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00465 #define FSOUND_PRESET_PADDEDCELL       {1,      1.4f,   1.00f, -1000,  -6000,  0,   0.17f,  0.10f, 1.0f,  -1204, 0.001f, { 0.0f,0.0f,0.0f },   207, 0.002f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00466 #define FSOUND_PRESET_ROOM                 {2,  1.9f,   1.00f, -1000,  -454,   0,   0.40f,  0.83f, 1.0f,  -1646, 0.002f, { 0.0f,0.0f,0.0f },    53, 0.003f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00467 #define FSOUND_PRESET_BATHROOM         {3,      1.4f,   1.00f, -1000,  -1200,  0,   1.49f,  0.54f, 1.0f,   -370, 0.007f, { 0.0f,0.0f,0.0f },  1030, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f,  60.0f, 0x3f }
00468 #define FSOUND_PRESET_LIVINGROOM       {4,      2.5f,   1.00f, -1000,  -6000,  0,   0.50f,  0.10f, 1.0f,  -1376, 0.003f, { 0.0f,0.0f,0.0f }, -1104, 0.004f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00469 #define FSOUND_PRESET_STONEROOM        {5,      11.6f,  1.00f, -1000,  -300,   0,   2.31f,  0.64f, 1.0f,   -711, 0.012f, { 0.0f,0.0f,0.0f },    83, 0.017f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00470 #define FSOUND_PRESET_AUDITORIUM       {6,      21.6f,  1.00f, -1000,  -476,   0,   4.32f,  0.59f, 1.0f,   -789, 0.020f, { 0.0f,0.0f,0.0f },  -289, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00471 #define FSOUND_PRESET_CONCERTHALL      {7,      19.6f,  1.00f, -1000,  -500,   0,   3.92f,  0.70f, 1.0f,  -1230, 0.020f, { 0.0f,0.0f,0.0f },    -2, 0.029f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00472 #define FSOUND_PRESET_CAVE             {8,      14.6f,  1.00f, -1000,  0,      0,   2.91f,  1.30f, 1.0f,   -602, 0.015f, { 0.0f,0.0f,0.0f },  -302, 0.022f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
00473 #define FSOUND_PRESET_ARENA            {9,      36.2f,  1.00f, -1000,  -698,   0,   7.24f,  0.33f, 1.0f,  -1166, 0.020f, { 0.0f,0.0f,0.0f },    16, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00474 #define FSOUND_PRESET_HANGAR           {10,     50.3f,  1.00f, -1000,  -1000,  0,   10.05f, 0.23f, 1.0f,   -602, 0.020f, { 0.0f,0.0f,0.0f },   198, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00475 #define FSOUND_PRESET_CARPETTEDHALLWAY {11,     1.9f,   1.00f, -1000,  -4000,  0,   0.30f,  0.10f, 1.0f,  -1831, 0.002f, { 0.0f,0.0f,0.0f }, -1630, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00476 #define FSOUND_PRESET_HALLWAY          {12,     1.8f,   1.00f, -1000,  -300,   0,   1.49f,  0.59f, 1.0f,  -1219, 0.007f, { 0.0f,0.0f,0.0f },   441, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00477 #define FSOUND_PRESET_STONECORRIDOR    {13,     13.5f,  1.00f, -1000,  -237,   0,   2.70f,  0.79f, 1.0f,  -1214, 0.013f, { 0.0f,0.0f,0.0f },   395, 0.020f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00478 #define FSOUND_PRESET_ALLEY            {14,     7.5f,   0.30f, -1000,  -270,   0,   1.49f,  0.86f, 1.0f,  -1204, 0.007f, { 0.0f,0.0f,0.0f },    -4, 0.011f, { 0.0f,0.0f,0.0f }, 0.125f, 0.95f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00479 #define FSOUND_PRESET_FOREST           {15,     38.0f,  0.30f, -1000,  -3300,  0,   1.49f,  0.54f, 1.0f,  -2560, 0.162f, { 0.0f,0.0f,0.0f },  -229, 0.088f, { 0.0f,0.0f,0.0f }, 0.125f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  79.0f, 100.0f, 0x3f }
00480 #define FSOUND_PRESET_CITY             {16,     7.5f,   0.50f, -1000,  -800,   0,   1.49f,  0.67f, 1.0f,  -2273, 0.007f, { 0.0f,0.0f,0.0f }, -1691, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  50.0f, 100.0f, 0x3f }
00481 #define FSOUND_PRESET_MOUNTAINS        {17,     100.0f, 0.27f, -1000,  -2500,  0,   1.49f,  0.21f, 1.0f,  -2780, 0.300f, { 0.0f,0.0f,0.0f }, -1434, 0.100f, { 0.0f,0.0f,0.0f }, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  27.0f, 100.0f, 0x1f }
00482 #define FSOUND_PRESET_QUARRY           {18,     17.5f,  1.00f, -1000,  -1000,  0,   1.49f,  0.83f, 1.0f, -10000, 0.061f, { 0.0f,0.0f,0.0f },   500, 0.025f, { 0.0f,0.0f,0.0f }, 0.125f, 0.70f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00483 #define FSOUND_PRESET_PLAIN            {19,     42.5f,  0.21f, -1000,  -2000,  0,   1.49f,  0.50f, 1.0f,  -2466, 0.179f, { 0.0f,0.0f,0.0f }, -1926, 0.100f, { 0.0f,0.0f,0.0f }, 0.250f, 1.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  21.0f, 100.0f, 0x3f }
00484 #define FSOUND_PRESET_PARKINGLOT       {20,     8.3f,   1.00f, -1000,  0,      0,   1.65f,  1.50f, 1.0f,  -1363, 0.008f, { 0.0f,0.0f,0.0f }, -1153, 0.012f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
00485 #define FSOUND_PRESET_SEWERPIPE        {21,     1.7f,   0.80f, -1000,  -1000,  0,   2.81f,  0.14f, 1.0f,    429, 0.014f, { 0.0f,0.0f,0.0f },  1023, 0.021f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 0.000f, -5.0f, 5000.0f, 250.0f, 0.0f,  80.0f,  60.0f, 0x3f }
00486 #define FSOUND_PRESET_UNDERWATER       {22,     1.8f,   1.00f, -1000,  -4000,  0,   1.49f,  0.10f, 1.0f,   -449, 0.007f, { 0.0f,0.0f,0.0f },  1700, 0.011f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 1.18f, 0.348f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x3f }
00487 
00488 /* Non I3DL2 presets */
00489 
00490 #define FSOUND_PRESET_DRUGGED          {23,     1.9f,   0.50f, -1000,  0,      0,   8.39f,  1.39f, 1.0f,  -115,  0.002f, { 0.0f,0.0f,0.0f },   985, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 0.25f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
00491 #define FSOUND_PRESET_DIZZY            {24,     1.8f,   0.60f, -1000,  -400,   0,   17.23f, 0.56f, 1.0f,  -1713, 0.020f, { 0.0f,0.0f,0.0f },  -613, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 1.00f, 0.81f, 0.310f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
00492 #define FSOUND_PRESET_PSYCHOTIC        {25,     1.0f,   0.50f, -1000,  -151,   0,   7.56f,  0.91f, 1.0f,  -626,  0.020f, { 0.0f,0.0f,0.0f },   774, 0.030f, { 0.0f,0.0f,0.0f }, 0.250f, 0.00f, 4.00f, 1.000f, -5.0f, 5000.0f, 250.0f, 0.0f, 100.0f, 100.0f, 0x1f }
00493 
00494 /* PlayStation 2 Only presets */
00495 
00496 #define FSOUND_PRESET_PS2_ROOM         {1,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00497 #define FSOUND_PRESET_PS2_STUDIO_A     {2,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00498 #define FSOUND_PRESET_PS2_STUDIO_B     {3,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00499 #define FSOUND_PRESET_PS2_STUDIO_C     {4,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00500 #define FSOUND_PRESET_PS2_HALL         {5,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00501 #define FSOUND_PRESET_PS2_SPACE        {6,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00502 #define FSOUND_PRESET_PS2_ECHO         {7,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00503 #define FSOUND_PRESET_PS2_DELAY        {8,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00504 #define FSOUND_PRESET_PS2_PIPE         {9,      0,          0,         0,  0,      0,   0.0f,   0.0f,  0.0f,     0,  0.000f, { 0.0f,0.0f,0.0f },     0, 0.000f, { 0.0f,0.0f,0.0f }, 0.000f, 0.00f, 0.00f, 0.000f,  0.0f, 0000.0f,   0.0f, 0.0f,   0.0f,   0.0f, 0x31f }
00505 
00506 /* [DEFINE_END] */
00507 
00508 
00509 /*
00510 [STRUCTURE] 
00511 [
00512     [DESCRIPTION]
00513     Structure defining the properties for a reverb source, related to a FSOUND channel.
00514     For more indepth descriptions of the reverb properties under win32, please see the EAX3
00515     documentation at http://developer.creative.com/ under the 'downloads' section.
00516     If they do not have the EAX3 documentation, then most information can be attained from
00517     the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of 
00518     EAX2.
00519     
00520     Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset.
00521     Note that integer values that typically range from -10,000 to 1000 are represented in 
00522     decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear.
00523     PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox).  
00524     Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then
00525     the reverb should product a similar effect on either platform.
00526     Linux and FMODCE do not support the reverb api.
00527     
00528     The numerical values listed below are the maximum, minimum and default values for each variable respectively.
00529 
00530     [SEE_ALSO]
00531     FSOUND_Reverb_SetChannelProperties
00532     FSOUND_Reverb_GetChannelProperties
00533     FSOUND_REVERB_CHANNELFLAGS
00534 ]
00535 */
00536 typedef struct _FSOUND_REVERB_CHANNELPROPERTIES /* MIN     MAX    DEFAULT */
00537 {                                   
00538     int    Direct;                              /* -10000, 1000,  0,    direct path level (at low and mid frequencies) (win32/xbox) */
00539     int    DirectHF;                            /* -10000, 0,     0,    relative direct path level at high frequencies (win32/xbox) */
00540     int    Room;                                /* -10000, 1000,  0,    room effect level (at low and mid frequencies) (win32/xbox) */
00541     int    RoomHF;                              /* -10000, 0,     0,    relative room effect level at high frequencies (win32/xbox) */
00542     int    Obstruction;                         /* -10000, 0,     0,    main obstruction control (attenuation at high frequencies)  (win32/xbox) */
00543     float  ObstructionLFRatio;                  /* 0.0,    1.0,   0.0,  obstruction low-frequency level re. main control (win32/xbox) */
00544     int    Occlusion;                           /* -10000, 0,     0,    main occlusion control (attenuation at high frequencies) (win32/xbox) */
00545     float  OcclusionLFRatio;                    /* 0.0,    1.0,   0.25, occlusion low-frequency level re. main control (win32/xbox) */
00546     float  OcclusionRoomRatio;                  /* 0.0,    10.0,  1.5,  relative occlusion control for room effect (win32) */
00547     float  OcclusionDirectRatio;                /* 0.0,    10.0,  1.0,  relative occlusion control for direct path (win32) */
00548     int    Exclusion;                           /* -10000, 0,     0,    main exlusion control (attenuation at high frequencies) (win32) */
00549     float  ExclusionLFRatio;                    /* 0.0,    1.0,   1.0,  exclusion low-frequency level re. main control (win32) */
00550     int    OutsideVolumeHF;                     /* -10000, 0,     0,    outside sound cone level at high frequencies (win32) */
00551     float  DopplerFactor;                       /* 0.0,    10.0,  0.0,  like DS3D flDopplerFactor but per source (win32) */
00552     float  RolloffFactor;                       /* 0.0,    10.0,  0.0,  like DS3D flRolloffFactor but per source (win32) */
00553     float  RoomRolloffFactor;                   /* 0.0,    10.0,  0.0,  like DS3D flRolloffFactor but for room effect (win32/xbox) */
00554     float  AirAbsorptionFactor;                 /* 0.0,    10.0,  1.0,  multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (win32) */
00555     int    Flags;                               /* FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (win32) */
00556 } FSOUND_REVERB_CHANNELPROPERTIES;
00557 
00558 
00559 /*
00560 [DEFINE_START] 
00561 [
00562     [NAME] 
00563     FSOUND_REVERB_CHANNELFLAGS
00564     
00565     [DESCRIPTION]
00566     Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
00567 
00568     [SEE_ALSO]
00569     FSOUND_REVERB_CHANNELPROPERTIES
00570 ]
00571 */
00572 #define FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO  0x00000001 /* Automatic setting of 'Direct'  due to distance from listener */
00573 #define FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO      0x00000002 /* Automatic setting of 'Room'  due to distance from listener */
00574 #define FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO    0x00000004 /* Automatic setting of 'RoomHF' due to distance from listener */
00575 #define FSOUND_REVERB_CHANNELFLAGS_DEFAULT       (FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO |   \
00576                                                   FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO|        \
00577                                                   FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO)
00578 /* [DEFINE_END] */
00579 
00580 
00581 /*
00582 [ENUM] 
00583 [
00584     [DESCRIPTION]
00585     These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
00586 
00587     [SEE_ALSO]
00588     FSOUND_FX_Enable
00589     FSOUND_FX_Disable
00590     FSOUND_FX_SetChorus
00591     FSOUND_FX_SetCompressor
00592     FSOUND_FX_SetDistortion
00593     FSOUND_FX_SetEcho
00594     FSOUND_FX_SetFlanger
00595     FSOUND_FX_SetGargle
00596     FSOUND_FX_SetI3DL2Reverb
00597     FSOUND_FX_SetParamEQ
00598     FSOUND_FX_SetWavesReverb
00599 ]
00600 */
00601 enum FSOUND_FX_MODES
00602 {
00603     FSOUND_FX_CHORUS,
00604     FSOUND_FX_COMPRESSOR,
00605     FSOUND_FX_DISTORTION,
00606     FSOUND_FX_ECHO,
00607     FSOUND_FX_FLANGER,
00608     FSOUND_FX_GARGLE,
00609     FSOUND_FX_I3DL2REVERB,
00610     FSOUND_FX_PARAMEQ,
00611     FSOUND_FX_WAVES_REVERB,
00612 
00613     FSOUND_FX_MAX
00614 };
00615 
00616 /*
00617 [ENUM]
00618 [
00619     [DESCRIPTION]   
00620     These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
00621     Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes.  Other output modes will only 
00622     interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
00623     Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes.  Other output modes will only 
00624     interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
00625 
00626     Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure.
00627 
00628     [SEE_ALSO]
00629     FSOUND_SetSpeakerMode
00630 
00631 ]
00632 */
00633 enum FSOUND_SPEAKERMODES
00634 {
00635     FSOUND_SPEAKERMODE_DOLBYDIGITAL,  /* The audio is played through a speaker arrangement of surround speakers with a subwoofer. */
00636     FSOUND_SPEAKERMODE_HEADPHONES,    /* The speakers are headphones. */
00637     FSOUND_SPEAKERMODE_MONO,          /* The speakers are monaural. */
00638     FSOUND_SPEAKERMODE_QUAD,          /* The speakers are quadraphonic.  */
00639     FSOUND_SPEAKERMODE_STEREO,        /* The speakers are stereo (default value). */
00640     FSOUND_SPEAKERMODE_SURROUND,      /* The speakers are surround sound. */
00641     FSOUND_SPEAKERMODE_DTS,           /* (XBOX Only) The audio is played through a speaker arrangement of surround speakers with a subwoofer. */
00642     FSOUND_SPEAKERMODE_PROLOGIC2      /* Dolby Prologic 2.  Currently Gamecube only */
00643 };
00644 
00645 
00646 /*
00647 [DEFINE_START] 
00648 [
00649     [NAME] 
00650     FSOUND_INIT_FLAGS
00651     
00652     [DESCRIPTION]   
00653     Initialization flags.  Use them with FSOUND_Init in the flags parameter to change various behaviour.
00654     
00655     FSOUND_INIT_ENABLEOUTPUTFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects.
00656     Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small.
00657     This can be fixed with FSOUND_SetBufferSize.  Increase the BufferSize until it works.
00658     When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters.
00659 
00660     [SEE_ALSO]
00661     FSOUND_Init
00662 ]
00663 */
00664 #define FSOUND_INIT_USEDEFAULTMIDISYNTH     0x0001    /* Causes MIDI playback to force software decoding. */
00665 #define FSOUND_INIT_GLOBALFOCUS             0x0002    /* For DirectSound output - sound is not muted when window is out of focus. */
00666 #define FSOUND_INIT_ENABLEOUTPUTFX          0x0004    /* For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output! */
00667 #define FSOUND_INIT_ACCURATEVULEVELS        0x0008    /* This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit */
00668 #define FSOUND_INIT_PS2_DISABLECORE0REVERB  0x0010    /* PS2 only - Disable reverb on CORE 0 to regain SRAM */
00669 #define FSOUND_INIT_PS2_DISABLECORE1REVERB  0x0020    /* PS2 only - Disable reverb on CORE 1 to regain SRAM */
00670 #define FSOUND_INIT_PS2_SWAPDMACORES        0x0040    /* PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around */
00671 #define FSOUND_INIT_DONTLATENCYADJUST       0x0080    /* Callbacks are not latency adjusted, and are called at mix time.  Also information functions are immediate */
00672 #define FSOUND_INIT_GC_INITLIBS             0x0100    /* Gamecube only - Initializes GC audio libraries */
00673 /* [DEFINE_END] */
00674 
00675 
00676 
00677 
00678 /* ========================================================================================== */
00679 /* FUNCTION PROTOTYPES                                                                        */
00680 /* ========================================================================================== */
00681 
00682 #ifdef __cplusplus
00683 extern "C" {
00684 #endif
00685 
00686 /* ================================== */
00687 /* Initialization / Global functions. */
00688 /* ================================== */
00689 
00690 /* 
00691     PRE - FSOUND_Init functions. These can't be called after FSOUND_Init is 
00692     called (they will fail). They set up FMOD system functionality. 
00693 */
00694 
00695 DLL_API signed char     F_API FSOUND_SetOutput(int outputtype);
00696 DLL_API signed char     F_API FSOUND_SetDriver(int driver);
00697 DLL_API signed char     F_API FSOUND_SetMixer(int mixer);
00698 DLL_API signed char     F_API FSOUND_SetBufferSize(int len_ms);
00699 DLL_API signed char     F_API FSOUND_SetHWND(void *hwnd);
00700 DLL_API signed char     F_API FSOUND_SetMinHardwareChannels(int min);
00701 DLL_API signed char     F_API FSOUND_SetMaxHardwareChannels(int max);
00702 DLL_API signed char     F_API FSOUND_SetMemorySystem(void *pool, 
00703                                                      int poollen, 
00704                                                      FSOUND_ALLOCCALLBACK   useralloc,
00705                                                      FSOUND_REALLOCCALLBACK userrealloc,
00706                                                      FSOUND_FREECALLBACK    userfree);
00707 /* 
00708     Main initialization / closedown functions.
00709     Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override 
00710            with MIDI playback.
00711          : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter 
00712            which window is in focus. (FSOUND_OUTPUT_DSOUND only)
00713 */
00714 
00715 DLL_API signed char     F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
00716 DLL_API void            F_API FSOUND_Close();
00717 
00718 /* 
00719     Runtime system level functions 
00720 */
00721 
00722 DLL_API void            F_API FSOUND_Update();   /* This is called to update 3d sound / non-realtime output */
00723 
00724 DLL_API void            F_API FSOUND_SetSpeakerMode(unsigned int speakermode);
00725 DLL_API void            F_API FSOUND_SetSFXMasterVolume(int volume);
00726 DLL_API void            F_API FSOUND_SetPanSeperation(float pansep);
00727 DLL_API void            F_API FSOUND_File_SetCallbacks(FSOUND_OPENCALLBACK  useropen,
00728                                                        FSOUND_CLOSECALLBACK userclose,
00729                                                        FSOUND_READCALLBACK  userread,
00730                                                        FSOUND_SEEKCALLBACK  userseek,
00731                                                        FSOUND_TELLCALLBACK  usertell);
00732 
00733 /* 
00734     System information functions. 
00735 */
00736 
00737 DLL_API int             F_API FSOUND_GetError();
00738 DLL_API float           F_API FSOUND_GetVersion();
00739 DLL_API int             F_API FSOUND_GetOutput();
00740 DLL_API void *          F_API FSOUND_GetOutputHandle();
00741 DLL_API int             F_API FSOUND_GetDriver();
00742 DLL_API int             F_API FSOUND_GetMixer();
00743 DLL_API int             F_API FSOUND_GetNumDrivers();
00744 DLL_API const char *    F_API FSOUND_GetDriverName(int id);
00745 DLL_API signed char     F_API FSOUND_GetDriverCaps(int id, unsigned int *caps);
00746 DLL_API int             F_API FSOUND_GetOutputRate();
00747 DLL_API int             F_API FSOUND_GetMaxChannels();
00748 DLL_API int             F_API FSOUND_GetMaxSamples();
00749 DLL_API int             F_API FSOUND_GetSFXMasterVolume();
00750 DLL_API int             F_API FSOUND_GetNumHardwareChannels();
00751 DLL_API int             F_API FSOUND_GetChannelsPlaying();
00752 DLL_API float           F_API FSOUND_GetCPUUsage();
00753 DLL_API void            F_API FSOUND_GetMemoryStats(unsigned int *currentalloced, unsigned int *maxalloced);
00754 
00755 /* =================================== */
00756 /* Sample management / load functions. */
00757 /* =================================== */
00758 
00759 /* 
00760     Sample creation and management functions
00761     Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Sample_Load to load from memory.
00762            Use FSOUND_LOADRAW      flag with FSOUND_Sample_Load to treat as as raw pcm data.
00763 */
00764 
00765 DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int memlength);
00766 DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri);
00767 DLL_API void            F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr);
00768 DLL_API signed char     F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode);
00769 DLL_API signed char     F_API FSOUND_Sample_Lock(FSOUND_SAMPLE *sptr, int offset, int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
00770 DLL_API signed char     F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
00771 
00772 /*
00773     Sample control functions
00774 */
00775 
00776 DLL_API signed char     F_API FSOUND_Sample_SetMode(FSOUND_SAMPLE *sptr, unsigned int mode);
00777 DLL_API signed char     F_API FSOUND_Sample_SetLoopPoints(FSOUND_SAMPLE *sptr, int loopstart, int loopend);
00778 DLL_API signed char     F_API FSOUND_Sample_SetDefaults(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri);
00779 DLL_API signed char     F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max);
00780 DLL_API signed char     F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr, int max);
00781 
00782 /* 
00783     Sample information functions
00784 */
00785 
00786 DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
00787 DLL_API const char *    F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr);
00788 DLL_API unsigned int    F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr);
00789 DLL_API signed char     F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend);
00790 DLL_API signed char     F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri);
00791 DLL_API unsigned int    F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr);
00792   
00793 /* ============================ */
00794 /* Channel control functions.   */
00795 /* ============================ */
00796 
00797 /* 
00798     Playing and stopping sounds.  
00799     Note : Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
00800            Use FSOUND_ALL as the 'channel' variable to control ALL channels with one function call!
00801 */
00802 
00803 DLL_API int             F_API FSOUND_PlaySound(int channel, FSOUND_SAMPLE *sptr);
00804 DLL_API int             F_API FSOUND_PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused);
00805 DLL_API signed char     F_API FSOUND_StopSound(int channel);
00806 
00807 /* 
00808     Functions to control playback of a channel.
00809     Note : FSOUND_ALL can be used on most of these functions as a channel value.
00810 */
00811 
00812 DLL_API signed char     F_API FSOUND_SetFrequency(int channel, int freq);
00813 DLL_API signed char     F_API FSOUND_SetVolume(int channel, int vol);
00814 DLL_API signed char     F_API FSOUND_SetVolumeAbsolute(int channel, int vol);
00815 DLL_API signed char     F_API FSOUND_SetPan(int channel, int pan);
00816 DLL_API signed char     F_API FSOUND_SetSurround(int channel, signed char surround);
00817 DLL_API signed char     F_API FSOUND_SetMute(int channel, signed char mute);
00818 DLL_API signed char     F_API FSOUND_SetPriority(int channel, int priority);
00819 DLL_API signed char     F_API FSOUND_SetReserved(int channel, signed char reserved);
00820 DLL_API signed char     F_API FSOUND_SetPaused(int channel, signed char paused);
00821 DLL_API signed char     F_API FSOUND_SetLoopMode(int channel, unsigned int loopmode);
00822 DLL_API signed char     F_API FSOUND_SetCurrentPosition(int channel, unsigned int offset);
00823 
00824 /* 
00825     Channel information functions.
00826 */
00827 
00828 DLL_API signed char     F_API FSOUND_IsPlaying(int channel);
00829 DLL_API int             F_API FSOUND_GetFrequency(int channel);
00830 DLL_API int             F_API FSOUND_GetVolume(int channel);
00831 DLL_API int             F_API FSOUND_GetPan(int channel);
00832 DLL_API signed char     F_API FSOUND_GetSurround(int channel);
00833 DLL_API signed char     F_API FSOUND_GetMute(int channel);
00834 DLL_API int             F_API FSOUND_GetPriority(int channel);
00835 DLL_API signed char     F_API FSOUND_GetReserved(int channel);
00836 DLL_API signed char     F_API FSOUND_GetPaused(int channel);
00837 DLL_API unsigned int    F_API FSOUND_GetLoopMode(int channel);
00838 DLL_API unsigned int    F_API FSOUND_GetCurrentPosition(int channel);
00839 DLL_API FSOUND_SAMPLE * F_API FSOUND_GetCurrentSample(int channel);
00840 DLL_API signed char     F_API FSOUND_GetCurrentLevels(int channel, float *l, float *r);
00841 
00842 
00843 /* =================== */
00844 /* FX functions.       */
00845 /* =================== */
00846 
00847 /* 
00848     Functions to control DX8 only effects processing.
00849 
00850     - FX enabled samples can only be played once at a time, not multiple times at once.
00851     - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work.
00852     - FSOUND_INIT_ENABLEOUTPUTFX can be used to apply hardware effect processing to the
00853       global mixed output of FMOD's software channels.
00854     - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters.
00855     - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type,
00856       it will return a unique handle for each FX.
00857     - FSOUND_FX_Enable cannot be called if the sound is playing or locked.
00858     - FSOUND_FX_Disable must be called to reset/clear the FX from a channel.
00859 */
00860 
00861 DLL_API int             F_API FSOUND_FX_Enable(int channel, unsigned int fx);    /* See FSOUND_FX_MODES */
00862 DLL_API signed char     F_API FSOUND_FX_Disable(int channel);    
00863 
00864 DLL_API signed char     F_API FSOUND_FX_SetChorus(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase);
00865 DLL_API signed char     F_API FSOUND_FX_SetCompressor(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay);
00866 DLL_API signed char     F_API FSOUND_FX_SetDistortion(int fxid, float Gain, float Edge, float PostEQCenterFrequency, float PostEQBandwidth, float PreLowpassCutoff);
00867 DLL_API signed char     F_API FSOUND_FX_SetEcho(int fxid, float WetDryMix, float Feedback, float LeftDelay, float RightDelay, int PanDelay);
00868 DLL_API signed char     F_API FSOUND_FX_SetFlanger(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase);
00869 DLL_API signed char     F_API FSOUND_FX_SetGargle(int fxid, int RateHz, int WaveShape);
00870 DLL_API signed char     F_API FSOUND_FX_SetI3DL2Reverb(int fxid, int Room, int RoomHF, float RoomRolloffFactor, float DecayTime, float DecayHFRatio, int Reflections, float ReflectionsDelay, int Reverb, float ReverbDelay, float Diffusion, float Density, float HFReference);
00871 DLL_API signed char     F_API FSOUND_FX_SetParamEQ(int fxid, float Center, float Bandwidth, float Gain);
00872 DLL_API signed char     F_API FSOUND_FX_SetWavesReverb(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio);  
00873  
00874 /* =================== */
00875 /* 3D sound functions. */
00876 /* =================== */
00877 
00878 /* 
00879     See also FSOUND_Sample_SetMinMaxDistance (above)
00880     Note! FSOUND_3D_Update is now called FSOUND_Update.
00881 */
00882 
00883 DLL_API void            F_API FSOUND_3D_SetDopplerFactor(float scale);
00884 DLL_API void            F_API FSOUND_3D_SetDistanceFactor(float scale);
00885 DLL_API void            F_API FSOUND_3D_SetRolloffFactor(float scale);
00886 DLL_API signed char     F_API FSOUND_3D_SetAttributes(int channel, float *pos, float *vel);
00887 DLL_API signed char     F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel);
00888 
00889 DLL_API void            F_API FSOUND_3D_Listener_SetCurrent(int current, int numlisteners);  /* use this if you use multiple listeners / splitscreen */
00890 DLL_API void            F_API FSOUND_3D_Listener_SetAttributes(float *pos, float *vel, float fx, float fy, float fz, float tx, float ty, float tz);
00891 DLL_API void            F_API FSOUND_3D_Listener_GetAttributes(float *pos, float *vel, float *fx, float *fy, float *fz, float *tx, float *ty, float *tz);
00892  
00893 /* ========================= */
00894 /* File Streaming functions. */
00895 /* ========================= */
00896 
00897 /*
00898     Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Stream_OpenFile to stream from memory.
00899            Use FSOUND_LOADRAW      flag with FSOUND_Stream_OpenFile to treat stream as raw pcm data.
00900            Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_OpenFile to open mpegs in 'accurate mode' for settime/gettime/getlengthms.
00901            Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
00902 */
00903 
00904 DLL_API signed char     F_API FSOUND_Stream_SetBufferSize(int ms);      /* call this before opening streams, not after */
00905 
00906 DLL_API FSOUND_STREAM * F_API FSOUND_Stream_OpenFile(const char *filename, unsigned int mode, int memlength);
00907 DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, int userdata);
00908 DLL_API signed char     F_API FSOUND_Stream_Close(FSOUND_STREAM *stream);
00909 
00910 DLL_API int             F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream);
00911 DLL_API int             F_API FSOUND_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused);
00912 DLL_API signed char     F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream);
00913 
00914 DLL_API signed char     F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, unsigned int position);
00915 DLL_API unsigned int    F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream);
00916 DLL_API signed char     F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms);
00917 DLL_API int             F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream);
00918 DLL_API int             F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream);
00919 DLL_API int             F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream);
00920 
00921 DLL_API signed char     F_API FSOUND_Stream_SetMode(FSOUND_STREAM *stream, unsigned int mode);
00922 DLL_API unsigned int    F_API FSOUND_Stream_GetMode(FSOUND_STREAM *stream);
00923 DLL_API signed char     F_API FSOUND_Stream_SetLoopPoints(FSOUND_STREAM *stream, unsigned int loopstartpcm, unsigned int loopendpcm);
00924 DLL_API int             F_API FSOUND_Stream_GetOpenState(FSOUND_STREAM *stream);                /* use with FSOUND_NONBLOCKING opened streams */
00925 DLL_API FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream);
00926 DLL_API FSOUND_DSPUNIT *F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, int param);
00927 
00928 DLL_API signed char     F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata);
00929 DLL_API signed char     F_API FSOUND_Stream_SetSynchCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata);
00930 DLL_API int             F_API FSOUND_Stream_AddSynchPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, int userdata);
00931 DLL_API signed char     F_API FSOUND_Stream_DeleteSynchPoint(FSOUND_STREAM *stream, int index);
00932 DLL_API int             F_API FSOUND_Stream_GetNumSynchPoints(FSOUND_STREAM *stream);
00933 
00934 DLL_API signed char     F_API FSOUND_Stream_SetSubStream(FSOUND_STREAM *stream, int index);     /* For FMOD .FSB bank files. */
00935 DLL_API int             F_API FSOUND_Stream_GetNumSubStreams(FSOUND_STREAM *stream);            /* For FMOD .FSB bank files. */
00936 DLL_API signed char     F_API FSOUND_Stream_SetSubStreamSentence(FSOUND_STREAM *stream, int *sentencelist, int numitems);
00937 
00938 /* =================== */
00939 /* CD audio functions. */
00940 /* =================== */
00941 
00942 /*
00943     Note : 0 = default cdrom.  Otherwise specify the drive letter, for example. 'D'. 
00944 */
00945 
00946 DLL_API signed char     F_API FSOUND_CD_Play(char drive, int track);
00947 DLL_API void            F_API FSOUND_CD_SetPlayMode(char drive, signed char mode);
00948 DLL_API signed char     F_API FSOUND_CD_Stop(char drive);
00949 DLL_API signed char     F_API FSOUND_CD_SetPaused(char drive, signed char paused);
00950 DLL_API signed char     F_API FSOUND_CD_SetVolume(char drive, int volume);
00951 DLL_API signed char     F_API FSOUND_CD_SetTrackTime(char drive, unsigned int ms);
00952 DLL_API signed char     F_API FSOUND_CD_Eject(char drive);
00953 
00954 DLL_API signed char     F_API FSOUND_CD_GetPaused(char drive);
00955 DLL_API int             F_API FSOUND_CD_GetTrack(char drive);
00956 DLL_API int             F_API FSOUND_CD_GetNumTracks(char drive);
00957 DLL_API int             F_API FSOUND_CD_GetVolume(char drive);
00958 DLL_API int             F_API FSOUND_CD_GetTrackLength(char drive, int track); 
00959 DLL_API int             F_API FSOUND_CD_GetTrackTime(char drive);
00960 
00961 /* ============== */
00962 /* DSP functions. */
00963 /* ============== */
00964 
00965 /* 
00966     DSP Unit control and information functions. 
00967     These functions allow you access to the mixed stream that FMOD uses to play back sound on.
00968 */
00969 
00970 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, int param);
00971 DLL_API void            F_API FSOUND_DSP_Free(FSOUND_DSPUNIT *unit);
00972 DLL_API void            F_API FSOUND_DSP_SetPriority(FSOUND_DSPUNIT *unit, int priority);
00973 DLL_API int             F_API FSOUND_DSP_GetPriority(FSOUND_DSPUNIT *unit);
00974 DLL_API void            F_API FSOUND_DSP_SetActive(FSOUND_DSPUNIT *unit, signed char active);
00975 DLL_API signed char     F_API FSOUND_DSP_GetActive(FSOUND_DSPUNIT *unit);
00976 
00977 /* 
00978     Functions to get hold of FSOUND 'system DSP unit' handles. 
00979 */
00980 
00981 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClearUnit();
00982 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetSFXUnit();
00983 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetMusicUnit();
00984 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetFFTUnit();
00985 DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClipAndCopyUnit();
00986 
00987 /* 
00988     Miscellaneous DSP functions 
00989     Note for the spectrum analysis function to work, you have to enable the FFT DSP unit with 
00990     the following code FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);
00991     It is off by default to save cpu usage.
00992 */
00993 
00994 DLL_API signed char     F_API FSOUND_DSP_MixBuffers(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode);
00995 DLL_API void            F_API FSOUND_DSP_ClearMixBuffer();
00996 DLL_API int             F_API FSOUND_DSP_GetBufferLength();      /* Length of each DSP update */
00997 DLL_API int             F_API FSOUND_DSP_GetBufferLengthTotal(); /* Total buffer length due to FSOUND_SetBufferSize */
00998 DLL_API float *         F_API FSOUND_DSP_GetSpectrum();          /* Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. */
00999 
01000 /* =================================================================================== */
01001 /* Reverb functions. (eax2/eax3 reverb)  (ONLY SUPPORTED ON WIN32 W/ FSOUND_HW3D FLAG) */
01002 /* =================================================================================== */
01003 
01004 /*
01005     See top of file for definitions and information on the reverb parameters.
01006 */
01007 
01008 DLL_API signed char     F_API FSOUND_Reverb_SetProperties(FSOUND_REVERB_PROPERTIES *prop);
01009 DLL_API signed char     F_API FSOUND_Reverb_GetProperties(FSOUND_REVERB_PROPERTIES *prop);
01010 DLL_API signed char     F_API FSOUND_Reverb_SetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop);
01011 DLL_API signed char     F_API FSOUND_Reverb_GetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop);
01012 
01013 /* ===================================================== */
01014 /* Recording functions  (ONLY SUPPORTED IN WIN32, WINCE) */
01015 /* ===================================================== */
01016 
01017 /*
01018     Recording initialization functions
01019 */
01020 
01021 DLL_API signed char     F_API FSOUND_Record_SetDriver(int outputtype);
01022 DLL_API int             F_API FSOUND_Record_GetNumDrivers();
01023 DLL_API const char *    F_API FSOUND_Record_GetDriverName(int id);
01024 DLL_API int             F_API FSOUND_Record_GetDriver();
01025 
01026 /*
01027     Recording functionality.  Only one recording session will work at a time.
01028 */
01029 
01030 DLL_API signed char     F_API FSOUND_Record_StartSample(FSOUND_SAMPLE *sptr, signed char loop);
01031 DLL_API signed char     F_API FSOUND_Record_Stop();
01032 DLL_API int             F_API FSOUND_Record_GetPosition();  
01033 
01034 /* ========================================================================================== */
01035 /* FMUSIC API (MOD,S3M,XM,IT,MIDI PLAYBACK)                                                   */
01036 /* ========================================================================================== */
01037 
01038 /* 
01039     Song management / playback functions.
01040 */
01041 
01042 DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name);
01043 DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const char *name_or_data, int memlength, unsigned int mode, int *samplelist, int samplelistnum);
01044 DLL_API signed char     F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod);
01045 DLL_API signed char     F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod);
01046 DLL_API signed char     F_API FMUSIC_StopSong(FMUSIC_MODULE *mod);
01047 DLL_API void            F_API FMUSIC_StopAllSongs();
01048 
01049 DLL_API signed char     F_API FMUSIC_SetZxxCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback);
01050 DLL_API signed char     F_API FMUSIC_SetRowCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep);
01051 DLL_API signed char     F_API FMUSIC_SetOrderCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep);
01052 DLL_API signed char     F_API FMUSIC_SetInstCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument);
01053 
01054 DLL_API signed char     F_API FMUSIC_SetSample(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr);
01055 DLL_API signed char     F_API FMUSIC_SetUserData(FMUSIC_MODULE *mod, unsigned int userdata);
01056 DLL_API signed char     F_API FMUSIC_OptimizeChannels(FMUSIC_MODULE *mod, int maxchannels, int minvolume);
01057 
01058 /*
01059     Runtime song functions. 
01060 */
01061 
01062 DLL_API signed char     F_API FMUSIC_SetReverb(signed char reverb);             /* MIDI only */
01063 DLL_API signed char     F_API FMUSIC_SetLooping(FMUSIC_MODULE *mod, signed char looping);
01064 DLL_API signed char     F_API FMUSIC_SetOrder(FMUSIC_MODULE *mod, int order);
01065 DLL_API signed char     F_API FMUSIC_SetPaused(FMUSIC_MODULE *mod, signed char pause);
01066 DLL_API signed char     F_API FMUSIC_SetMasterVolume(FMUSIC_MODULE *mod, int volume);
01067 DLL_API signed char     F_API FMUSIC_SetMasterSpeed(FMUSIC_MODULE *mode, float speed);
01068 DLL_API signed char     F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float pansep);
01069  
01070 /* 
01071     Static song information functions.
01072 */
01073 
01074 DLL_API const char *    F_API FMUSIC_GetName(FMUSIC_MODULE *mod);
01075 DLL_API int             F_API FMUSIC_GetType(FMUSIC_MODULE *mod);
01076 DLL_API int             F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod);
01077 DLL_API int             F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod);
01078 DLL_API int             F_API FMUSIC_GetNumInstruments(FMUSIC_MODULE *mod);
01079 DLL_API int             F_API FMUSIC_GetNumSamples(FMUSIC_MODULE *mod);
01080 DLL_API int             F_API FMUSIC_GetNumChannels(FMUSIC_MODULE *mod);
01081 DLL_API FSOUND_SAMPLE * F_API FMUSIC_GetSample(FMUSIC_MODULE *mod, int sampno);
01082 DLL_API int             F_API FMUSIC_GetPatternLength(FMUSIC_MODULE *mod, int orderno);
01083  
01084 /* 
01085     Runtime song information.
01086 */
01087 
01088 DLL_API signed char     F_API FMUSIC_IsFinished(FMUSIC_MODULE *mod);
01089 DLL_API signed char     F_API FMUSIC_IsPlaying(FMUSIC_MODULE *mod);
01090 DLL_API int             F_API FMUSIC_GetMasterVolume(FMUSIC_MODULE *mod);
01091 DLL_API int             F_API FMUSIC_GetGlobalVolume(FMUSIC_MODULE *mod);
01092 DLL_API int             F_API FMUSIC_GetOrder(FMUSIC_MODULE *mod);
01093 DLL_API int             F_API FMUSIC_GetPattern(FMUSIC_MODULE *mod);
01094 DLL_API int             F_API FMUSIC_GetSpeed(FMUSIC_MODULE *mod);
01095 DLL_API int             F_API FMUSIC_GetBPM(FMUSIC_MODULE *mod);
01096 DLL_API int             F_API FMUSIC_GetRow(FMUSIC_MODULE *mod);
01097 DLL_API signed char     F_API FMUSIC_GetPaused(FMUSIC_MODULE *mod);
01098 DLL_API int             F_API FMUSIC_GetTime(FMUSIC_MODULE *mod);
01099 DLL_API int             F_API FMUSIC_GetRealChannel(FMUSIC_MODULE *mod, int modchannel);
01100 DLL_API unsigned int    F_API FMUSIC_GetUserData(FMUSIC_MODULE *mod);
01101 
01102 #ifdef __cplusplus
01103 }
01104 #endif
01105 
01106 #endif

Erzeugt am Thu Jun 19 22:50:44 2003 für Schneeweiß von doxygen1.3