nuclear@0: //========================================================================================== nuclear@0: // FMOD Main header file. Copyright (c), FireLight Multimedia 1999-2000. nuclear@0: //========================================================================================== nuclear@0: nuclear@0: #ifndef _FMOD_H_ nuclear@0: #define _FMOD_H_ nuclear@0: nuclear@0: //=============================================================================================== nuclear@0: // DEFINITIONS nuclear@0: //=============================================================================================== nuclear@0: nuclear@0: #if defined(__GNUC__) && defined(WIN32) nuclear@0: #define _cdecl nuclear@0: #endif /* defined(__GNUC__) && defined(WIN32) */ nuclear@0: nuclear@0: #if defined(PLATFORM_LINUX) nuclear@0: #define _cdecl nuclear@0: #define _stdcall nuclear@0: #define __cdecl nuclear@0: #define __stdcall nuclear@0: #define __declspec(x) nuclear@0: #define __PS __attribute__((packed)) /* gcc packed */ nuclear@0: #else nuclear@0: #define __PS /*dummy*/ nuclear@0: #endif nuclear@0: nuclear@0: #define F_API _stdcall nuclear@0: nuclear@0: #ifdef DLL_EXPORTS nuclear@0: #define DLL_API __declspec(dllexport) nuclear@0: #else nuclear@0: #ifdef __LCC__ nuclear@0: #define DLL_API F_API nuclear@0: #else nuclear@0: #define DLL_API nuclear@0: #endif // __LCC__ nuclear@0: #endif //DLL_EXPORTS nuclear@0: nuclear@0: nuclear@0: #define FMOD_VERSION 3.32f nuclear@0: nuclear@0: nuclear@0: // fmod defined types nuclear@0: typedef struct FSOUND_MATERIAL FSOUND_MATERIAL; nuclear@0: typedef struct FSOUND_GEOMLIST FSOUND_GEOMLIST; nuclear@0: typedef struct FSOUND_SAMPLE FSOUND_SAMPLE; nuclear@0: typedef struct FSOUND_STREAM FSOUND_STREAM; nuclear@0: typedef struct FSOUND_DSPUNIT FSOUND_DSPUNIT; nuclear@0: typedef struct FMUSIC_MODULE FMUSIC_MODULE; nuclear@0: nuclear@0: // callback types nuclear@0: typedef signed char (_cdecl *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, int param); nuclear@0: typedef void * (_cdecl *FSOUND_DSPCALLBACK) (void *originalbuffer, void *newbuffer, int length, int param); nuclear@0: typedef void (_cdecl *FMUSIC_CALLBACK) (FMUSIC_MODULE *mod, unsigned char param); nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [ENUM] nuclear@0: [ nuclear@0: [DESCRIPTION] nuclear@0: On failure of commands in FMOD, use FSOUND_GetError to attain what happened. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_GetError nuclear@0: ] nuclear@0: */ nuclear@0: enum FMOD_ERRORS nuclear@0: { nuclear@0: FMOD_ERR_NONE, // No errors nuclear@0: FMOD_ERR_BUSY, // Cannot call this command after FSOUND_Init. Call FSOUND_Close first. nuclear@0: FMOD_ERR_UNINITIALIZED, // This command failed because FSOUND_Init or FSOUND_SetOutput was not called nuclear@0: FMOD_ERR_INIT, // Error initializing output device. nuclear@0: FMOD_ERR_ALLOCATED, // Error initializing output device, but more specifically, the output device is already in use and cannot be reused. nuclear@0: FMOD_ERR_PLAY, // Playing the sound failed. nuclear@0: FMOD_ERR_OUTPUT_FORMAT, // Soundcard does not support the features needed for this soundsystem (16bit stereo output) nuclear@0: FMOD_ERR_COOPERATIVELEVEL, // Error setting cooperative level for hardware. nuclear@0: FMOD_ERR_CREATEBUFFER, // Error creating hardware sound buffer. nuclear@0: FMOD_ERR_FILE_NOTFOUND, // File not found nuclear@0: FMOD_ERR_FILE_FORMAT, // Unknown file format nuclear@0: FMOD_ERR_FILE_BAD, // Error loading file nuclear@0: FMOD_ERR_MEMORY, // Not enough memory nuclear@0: FMOD_ERR_VERSION, // The version number of this file format is not supported nuclear@0: FMOD_ERR_INVALID_PARAM, // An invalid parameter was passed to this function nuclear@0: FMOD_ERR_NO_EAX, // Tried to use an EAX command on a non EAX enabled channel or output. nuclear@0: FMOD_ERR_NO_EAX2, // Tried to use an advanced EAX2 command on a non EAX2 enabled channel or output. nuclear@0: FMOD_ERR_CHANNEL_ALLOC, // Failed to allocate a new channel nuclear@0: FMOD_ERR_RECORD, // Recording is not supported on this machine nuclear@0: FMOD_ERR_MEDIAPLAYER, // Windows Media Player not installed so cant play wma or use internet streaming. nuclear@0: }; nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [ENUM] nuclear@0: [ nuclear@0: [DESCRIPTION] nuclear@0: These output types are used with FSOUND_SetOutput, to choose which output driver to use. nuclear@0: nuclear@0: FSOUND_OUTPUT_A3D will cause FSOUND_Init to FAIL if you have not got a vortex nuclear@0: based A3D card. The suggestion for this is to immediately try and reinitialize FMOD with nuclear@0: FSOUND_OUTPUT_DSOUND, and if this fails, try initializing FMOD with FSOUND_OUTPUT_WAVEOUT. nuclear@0: nuclear@0: FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver nuclear@0: does not support DirectX 6 Voice Manager Extensions. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_SetOutput nuclear@0: FSOUND_GetOutput nuclear@0: ] nuclear@0: */ nuclear@0: enum FSOUND_OUTPUTTYPES nuclear@0: { nuclear@0: FSOUND_OUTPUT_NOSOUND, // NoSound driver, all calls to this succeed but do nothing. nuclear@0: FSOUND_OUTPUT_WINMM, // Windows Multimedia driver. nuclear@0: FSOUND_OUTPUT_DSOUND, // DirectSound driver. You need this to get EAX or EAX2 support. nuclear@0: FSOUND_OUTPUT_A3D, // A3D driver. You need this to get geometry support. nuclear@0: FSOUND_OUTPUT_OSS, // Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers. nuclear@0: FSOUND_OUTPUT_ESD, // Linux/Unix ESD (Enlightment Sound Daemon) driver. nuclear@0: FSOUND_OUTPUT_ALSA // Linux Alsa driver. nuclear@0: }; nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [ENUM] nuclear@0: [ nuclear@0: [DESCRIPTION] nuclear@0: These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act nuclear@0: upon for other reasons using FSOUND_GetMixer. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_SetMixer nuclear@0: FSOUND_GetMixer nuclear@0: ] nuclear@0: */ nuclear@0: enum FSOUND_MIXERTYPES nuclear@0: { nuclear@0: FSOUND_MIXER_AUTODETECT, // Enables autodetection of the fastest mixer based on your cpu. nuclear@0: FSOUND_MIXER_BLENDMODE, // Enables the standard non mmx, blendmode mixer. nuclear@0: FSOUND_MIXER_MMXP5, // Enables the mmx, pentium optimized blendmode mixer. nuclear@0: FSOUND_MIXER_MMXP6, // Enables the mmx, ppro/p2/p3 optimized mixer. nuclear@0: nuclear@0: FSOUND_MIXER_QUALITY_AUTODETECT,// Enables autodetection of the fastest quality mixer based on your cpu. nuclear@0: FSOUND_MIXER_QUALITY_FPU, // Enables the interpolating/volume ramping FPU mixer. nuclear@0: FSOUND_MIXER_QUALITY_MMXP5, // Enables the interpolating/volume ramping p5 MMX mixer. nuclear@0: FSOUND_MIXER_QUALITY_MMXP6, // Enables the interpolating/volume ramping ppro/p2/p3+ MMX mixer. nuclear@0: }; nuclear@0: nuclear@0: /* nuclear@0: [ENUM] nuclear@0: [ nuclear@0: [DESCRIPTION] nuclear@0: These definitions describe the type of song being played. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FMUSIC_GetType nuclear@0: ] nuclear@0: */ nuclear@0: enum FMUSIC_TYPES nuclear@0: { nuclear@0: FMUSIC_TYPE_NONE, nuclear@0: FMUSIC_TYPE_MOD, // Protracker / Fasttracker nuclear@0: FMUSIC_TYPE_S3M, // ScreamTracker 3 nuclear@0: FMUSIC_TYPE_XM, // FastTracker 2 nuclear@0: FMUSIC_TYPE_IT, // Impulse Tracker. nuclear@0: FMUSIC_TYPE_MIDI, // MIDI file nuclear@0: }; nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_DSP_PRIORITIES nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: These default priorities are nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_DSP_Create nuclear@0: FSOUND_DSP_SetPriority nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT 0 // DSP CLEAR unit - done first nuclear@0: #define FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT 100 // DSP SFX unit - done second nuclear@0: #define FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT 200 // DSP MUSIC unit - done third nuclear@0: #define FSOUND_DSP_DEFAULTPRIORITY_USER 300 // User priority, use this as reference nuclear@0: #define FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT 1000 // DSP CLIP AND COPY unit - last nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_CAPS nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Driver description bitfields. Use FSOUND_Driver_GetCaps to determine if a driver enumerated nuclear@0: has the settings you are after. The enumerated driver depends on the output mode, see nuclear@0: FSOUND_OUTPUTTYPES nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_GetDriverCaps nuclear@0: FSOUND_OUTPUTTYPES nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_CAPS_HARDWARE 0x1 // This driver supports hardware accelerated 3d sound. nuclear@0: #define FSOUND_CAPS_EAX 0x2 // This driver supports EAX reverb nuclear@0: #define FSOUND_CAPS_GEOMETRY_OCCLUSIONS 0x4 // This driver supports (A3D) geometry occlusions nuclear@0: #define FSOUND_CAPS_GEOMETRY_REFLECTIONS 0x8 // This driver supports (A3D) geometry reflections nuclear@0: #define FSOUND_CAPS_EAX2 0x10 // This driver supports EAX2/A3D3 reverb nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_MODES nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Sample description bitfields, OR them together for loading and describing samples. nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_LOOP_OFF 0x00000001 // For non looping samples. nuclear@0: #define FSOUND_LOOP_NORMAL 0x00000002 // For forward looping samples. nuclear@0: #define FSOUND_LOOP_BIDI 0x00000004 // For bidirectional looping samples. (no effect if in hardware). nuclear@0: #define FSOUND_8BITS 0x00000008 // For 8 bit samples. nuclear@0: #define FSOUND_16BITS 0x00000010 // For 16 bit samples. nuclear@0: #define FSOUND_MONO 0x00000020 // For mono samples. nuclear@0: #define FSOUND_STEREO 0x00000040 // For stereo samples. nuclear@0: #define FSOUND_UNSIGNED 0x00000080 // For source data containing unsigned samples. nuclear@0: #define FSOUND_SIGNED 0x00000100 // For source data containing signed data. nuclear@0: #define FSOUND_DELTA 0x00000200 // For source data stored as delta values. nuclear@0: #define FSOUND_IT214 0x00000400 // For source data stored using IT214 compression. nuclear@0: #define FSOUND_IT215 0x00000800 // For source data stored using IT215 compression. nuclear@0: #define FSOUND_HW3D 0x00001000 // Attempts to make samples use 3d hardware acceleration. (if the card supports it) nuclear@0: #define FSOUND_2D 0x00002000 // Ignores any 3d processing. overrides FSOUND_HW3D. Located in software. nuclear@0: #define FSOUND_STREAMABLE 0x00004000 // For a streamable sound where you feed the data to it. If you dont supply this sound may come out corrupted. (only affects a3d output) nuclear@0: #define FSOUND_LOADMEMORY 0x00008000 // 'name' will be interpreted as a pointer to data for streaming and samples. nuclear@0: #define FSOUND_LOADRAW 0x00010000 // For will ignore file format and treat as raw pcm. nuclear@0: #define FSOUND_MPEGACCURATE 0x00020000 // For FSOUND_Stream_OpenFile - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime. WARNING, see FSOUNDStream_OpenFile for inital opening time performance issues. nuclear@0: nuclear@0: // Default sample type. Loop off, 8bit mono, signed, not hardware accelerated. nuclear@0: // Some API functions ignore 8bits and mono, as it may be an mpeg/wav/etc which has its format predetermined. nuclear@0: #define FSOUND_NORMAL (FSOUND_LOOP_OFF | FSOUND_8BITS | FSOUND_MONO) nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_CDPLAYMODES nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Playback method for a CD Audio track, using FSOUND_CD_Play nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_CD_Play nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_CD_PLAYCONTINUOUS 0 // Starts from the current track and plays to end of CD. nuclear@0: #define FSOUND_CD_PLAYONCE 1 // Plays the specified track then stops. nuclear@0: #define FSOUND_CD_PLAYLOOPED 2 // Plays the specified track looped, forever until stopped manually. nuclear@0: #define FSOUND_CD_PLAYRANDOM 3 // Plays tracks in random order nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_CHANNELSAMPLEMODE nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Miscellaneous values for FMOD functions. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_PlaySound nuclear@0: FSOUND_PlaySound3DAttrib nuclear@0: nuclear@0: FSOUND_Sample_Alloc nuclear@0: FSOUND_Sample_Load nuclear@0: FSOUND_SetPan nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_FREE -1 // value to play on any free channel, or to allocate a sample in a free sample slot. nuclear@0: #define FSOUND_UNMANAGED -2 // value to allocate a sample that is NOT managed by FSOUND or placed in a sample slot. nuclear@0: #define FSOUND_ALL -3 // for a channel index , this flag will affect ALL channels available! Not supported by every function. nuclear@0: #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. nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [ENUM] nuclear@0: [ nuclear@0: [DESCRIPTION] nuclear@0: These are environment types defined for use with the FSOUND_Reverb API. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_Reverb_SetEnvironment nuclear@0: FSOUND_Reverb_SetEnvironmentAdvanced nuclear@0: ] nuclear@0: */ nuclear@0: enum FSOUND_REVERB_ENVIRONMENTS nuclear@0: { nuclear@0: FSOUND_ENVIRONMENT_GENERIC, nuclear@0: FSOUND_ENVIRONMENT_PADDEDCELL, nuclear@0: FSOUND_ENVIRONMENT_ROOM, nuclear@0: FSOUND_ENVIRONMENT_BATHROOM, nuclear@0: FSOUND_ENVIRONMENT_LIVINGROOM, nuclear@0: FSOUND_ENVIRONMENT_STONEROOM, nuclear@0: FSOUND_ENVIRONMENT_AUDITORIUM, nuclear@0: FSOUND_ENVIRONMENT_CONCERTHALL, nuclear@0: FSOUND_ENVIRONMENT_CAVE, nuclear@0: FSOUND_ENVIRONMENT_ARENA, nuclear@0: FSOUND_ENVIRONMENT_HANGAR, nuclear@0: FSOUND_ENVIRONMENT_CARPETEDHALLWAY, nuclear@0: FSOUND_ENVIRONMENT_HALLWAY, nuclear@0: FSOUND_ENVIRONMENT_STONECORRIDOR, nuclear@0: FSOUND_ENVIRONMENT_ALLEY, nuclear@0: FSOUND_ENVIRONMENT_FOREST, nuclear@0: FSOUND_ENVIRONMENT_CITY, nuclear@0: FSOUND_ENVIRONMENT_MOUNTAINS, nuclear@0: FSOUND_ENVIRONMENT_QUARRY, nuclear@0: FSOUND_ENVIRONMENT_PLAIN, nuclear@0: FSOUND_ENVIRONMENT_PARKINGLOT, nuclear@0: FSOUND_ENVIRONMENT_SEWERPIPE, nuclear@0: FSOUND_ENVIRONMENT_UNDERWATER, nuclear@0: FSOUND_ENVIRONMENT_DRUGGED, nuclear@0: FSOUND_ENVIRONMENT_DIZZY, nuclear@0: FSOUND_ENVIRONMENT_PSYCHOTIC, nuclear@0: nuclear@0: FSOUND_ENVIRONMENT_COUNT nuclear@0: }; nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_REVERBMIX_USEDISTANCE nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Used with FSOUND_Reverb_SetMix, this setting allows reverb to attenuate based on distance from the listener. nuclear@0: Instead of hard coding a value with FSOUND_Reverb_SetMix, this value can be used instead, for a more natural nuclear@0: reverb dropoff. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_Reverb_SetMix nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_REVERBMIX_USEDISTANCE -1.0f // used with FSOUND_Reverb_SetMix to scale reverb by distance nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_REVERB_IGNOREPARAM nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Used with FSOUND_Reverb_SetEnvironment and FSOUND_Reverb_SetEnvironmentAdvanced, this can nuclear@0: be placed in the place of a specific parameter for the reverb setting. It allows you to nuclear@0: not set any parameters except the ones you are interested in .. and example would be this. nuclear@0: FSOUND_Reverb_SetEnvironment(FSOUND_REVERB_IGNOREPARAM, nuclear@0: FSOUND_REVERB_IGNOREPARAM, nuclear@0: FSOUND_REVERB_IGNOREPARAM, nuclear@0: 0.0f); nuclear@0: This means env, vol and decay are left alone, but 'damp' is set to 0. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_Reverb_SetEnvironment nuclear@0: FSOUND_Reverb_SetEnvironmentAdvanced nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_REVERB_IGNOREPARAM -9999999 // used with FSOUND_Reverb_SetEnvironmentAdvanced to ignore certain parameters by choice. nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_REVERB_PRESETS nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: A set of predefined environment PARAMETERS, created by Creative Labs nuclear@0: These can be placed directly into the FSOUND_Reverb_SetEnvironment call nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_Reverb_SetEnvironment nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_PRESET_OFF FSOUND_ENVIRONMENT_GENERIC,0.0f,0.0f,0.0f nuclear@0: #define FSOUND_PRESET_GENERIC FSOUND_ENVIRONMENT_GENERIC,0.5f,1.493f,0.5f nuclear@0: #define FSOUND_PRESET_PADDEDCELL FSOUND_ENVIRONMENT_PADDEDCELL,0.25f,0.1f,0.0f nuclear@0: #define FSOUND_PRESET_ROOM FSOUND_ENVIRONMENT_ROOM,0.417f,0.4f,0.666f nuclear@0: #define FSOUND_PRESET_BATHROOM FSOUND_ENVIRONMENT_BATHROOM,0.653f,1.499f,0.166f nuclear@0: #define FSOUND_PRESET_LIVINGROOM FSOUND_ENVIRONMENT_LIVINGROOM,0.208f,0.478f,0.0f nuclear@0: #define FSOUND_PRESET_STONEROOM FSOUND_ENVIRONMENT_STONEROOM,0.5f,2.309f,0.888f nuclear@0: #define FSOUND_PRESET_AUDITORIUM FSOUND_ENVIRONMENT_AUDITORIUM,0.403f,4.279f,0.5f nuclear@0: #define FSOUND_PRESET_CONCERTHALL FSOUND_ENVIRONMENT_CONCERTHALL,0.5f,3.961f,0.5f nuclear@0: #define FSOUND_PRESET_CAVE FSOUND_ENVIRONMENT_CAVE,0.5f,2.886f,1.304f nuclear@0: #define FSOUND_PRESET_ARENA FSOUND_ENVIRONMENT_ARENA,0.361f,7.284f,0.332f nuclear@0: #define FSOUND_PRESET_HANGAR FSOUND_ENVIRONMENT_HANGAR,0.5f,10.0f,0.3f nuclear@0: #define FSOUND_PRESET_CARPETEDHALLWAY FSOUND_ENVIRONMENT_CARPETEDHALLWAY,0.153f,0.259f,2.0f nuclear@0: #define FSOUND_PRESET_HALLWAY FSOUND_ENVIRONMENT_HALLWAY,0.361f,1.493f,0.0f nuclear@0: #define FSOUND_PRESET_STONECORRIDOR FSOUND_ENVIRONMENT_STONECORRIDOR,0.444f,2.697f,0.638f nuclear@0: #define FSOUND_PRESET_ALLEY FSOUND_ENVIRONMENT_ALLEY,0.25f,1.752f,0.776f nuclear@0: #define FSOUND_PRESET_FOREST FSOUND_ENVIRONMENT_FOREST,0.111f,3.145f,0.472f nuclear@0: #define FSOUND_PRESET_CITY FSOUND_ENVIRONMENT_CITY,0.111f,2.767f,0.224f nuclear@0: #define FSOUND_PRESET_MOUNTAINS FSOUND_ENVIRONMENT_MOUNTAINS,0.194f,7.841f,0.472f nuclear@0: #define FSOUND_PRESET_QUARRY FSOUND_ENVIRONMENT_QUARRY,1.0f,1.499f,0.5f nuclear@0: #define FSOUND_PRESET_PLAIN FSOUND_ENVIRONMENT_PLAIN,0.097f,2.767f,0.224f nuclear@0: #define FSOUND_PRESET_PARKINGLOT FSOUND_ENVIRONMENT_PARKINGLOT,0.208f,1.652f,1.5f nuclear@0: #define FSOUND_PRESET_SEWERPIPE FSOUND_ENVIRONMENT_SEWERPIPE,0.652f,2.886f,0.25f nuclear@0: #define FSOUND_PRESET_UNDERWATER FSOUND_ENVIRONMENT_UNDERWATER,1.0f,1.499f,0.0f nuclear@0: #define FSOUND_PRESET_DRUGGED FSOUND_ENVIRONMENT_DRUGGED,0.875f, 8.392f,1.388f nuclear@0: #define FSOUND_PRESET_DIZZY FSOUND_ENVIRONMENT_DIZZY,0.139f,17.234f,0.666f nuclear@0: #define FSOUND_PRESET_PSYCHOTIC FSOUND_ENVIRONMENT_PSYCHOTIC,0.486f,7.563f,0.806f nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_GEOMETRY_MODES nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Geometry flags, used as the mode flag in FSOUND_Geometry_AddPolygon nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_Geometry_AddPolygon nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_GEOMETRY_NORMAL 0x0 // Default geometry type. Occluding polygon nuclear@0: #define FSOUND_GEOMETRY_REFLECTIVE 0x01 // This polygon is reflective nuclear@0: #define FSOUND_GEOMETRY_OPENING 0x02 // Overlays a transparency over the previous polygon. The 'openingfactor' value supplied is copied internally. nuclear@0: #define FSOUND_GEOMETRY_OPENING_REFERENCE 0x04 // Overlays a transparency over the previous polygon. The 'openingfactor' supplied is pointed to (for access when building a list) nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: /* nuclear@0: [DEFINE_START] nuclear@0: [ nuclear@0: [NAME] nuclear@0: FSOUND_INIT_FLAGS nuclear@0: nuclear@0: [DESCRIPTION] nuclear@0: Initialization flags. Use them with FSOUND_Init in the flags parameter to change various behaviour. nuclear@0: nuclear@0: [SEE_ALSO] nuclear@0: FSOUND_Init nuclear@0: ] nuclear@0: */ nuclear@0: #define FSOUND_INIT_USEDEFAULTMIDISYNTH 0x01 // Causes MIDI playback to force software decoding. nuclear@0: #define FSOUND_INIT_GLOBALFOCUS 0x02 // For DirectSound output - sound is not muted when window is out of focus. nuclear@0: // [DEFINE_END] nuclear@0: nuclear@0: nuclear@0: nuclear@0: nuclear@0: //=============================================================================================== nuclear@0: // FUNCTION PROTOTYPES nuclear@0: //=============================================================================================== nuclear@0: nuclear@0: #ifdef __cplusplus nuclear@0: extern "C" { nuclear@0: #endif nuclear@0: nuclear@0: // ================================== nuclear@0: // Initialization / Global functions. nuclear@0: // ================================== nuclear@0: nuclear@0: // *Pre* FSOUND_Init functions. These can't be called after FSOUND_Init is nuclear@0: // called (they will fail). They set up FMOD system functionality. nuclear@0: DLL_API signed char F_API FSOUND_SetOutput(int outputtype); nuclear@0: DLL_API signed char F_API FSOUND_SetDriver(int driver); nuclear@0: DLL_API signed char F_API FSOUND_SetMixer(int mixer); nuclear@0: DLL_API signed char F_API FSOUND_SetBufferSize(int len_ms); nuclear@0: DLL_API signed char F_API FSOUND_SetHWND(void *hwnd); nuclear@0: DLL_API signed char F_API FSOUND_SetMinHardwareChannels(int min); nuclear@0: DLL_API signed char F_API FSOUND_SetMaxHardwareChannels(int max); nuclear@0: nuclear@0: // Main initialization / closedown functions. nuclear@0: // Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override with MIDI playback. nuclear@0: // : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter which window is in focus. nuclear@0: DLL_API signed char F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags); nuclear@0: DLL_API void F_API FSOUND_Close(); nuclear@0: nuclear@0: // Runtime nuclear@0: DLL_API void F_API FSOUND_SetSFXMasterVolume(int volume); nuclear@0: DLL_API void F_API FSOUND_SetPanSeperation(float pansep); nuclear@0: nuclear@0: // System information. nuclear@0: DLL_API int F_API FSOUND_GetError(); nuclear@0: DLL_API float F_API FSOUND_GetVersion(); nuclear@0: DLL_API int F_API FSOUND_GetOutput(); nuclear@0: DLL_API int F_API FSOUND_GetDriver(); nuclear@0: DLL_API int F_API FSOUND_GetMixer(); nuclear@0: DLL_API int F_API FSOUND_GetNumDrivers(); nuclear@0: DLL_API signed char * F_API FSOUND_GetDriverName(int id); nuclear@0: DLL_API signed char F_API FSOUND_GetDriverCaps(int id, unsigned int *caps); nuclear@0: DLL_API int F_API FSOUND_GetOutputRate(); nuclear@0: DLL_API int F_API FSOUND_GetMaxChannels(); nuclear@0: DLL_API int F_API FSOUND_GetMaxSamples(); nuclear@0: DLL_API int F_API FSOUND_GetSFXMasterVolume(); nuclear@0: DLL_API int F_API FSOUND_GetNumHardwareChannels(); nuclear@0: DLL_API int F_API FSOUND_GetChannelsPlaying(); nuclear@0: DLL_API float F_API FSOUND_GetCPUUsage(); nuclear@0: nuclear@0: // =================================== nuclear@0: // Sample management / load functions. nuclear@0: // =================================== nuclear@0: nuclear@0: // Note : Use FSOUND_LOADMEMORY flag with FSOUND_Sample_Load to load from memory. nuclear@0: // Use FSOUND_LOADRAW flag with FSOUND_Sample_Load to treat as as raw pcm data. nuclear@0: nuclear@0: // Sample creation and management functions nuclear@0: DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name, unsigned int mode, int memlength); nuclear@0: DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri); nuclear@0: DLL_API void F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr); nuclear@0: DLL_API signed char F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode); nuclear@0: 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); nuclear@0: DLL_API signed char F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2); nuclear@0: nuclear@0: // Sample control functions nuclear@0: DLL_API signed char F_API FSOUND_Sample_SetLoopMode(FSOUND_SAMPLE *sptr, unsigned int loopmode); nuclear@0: DLL_API signed char F_API FSOUND_Sample_SetLoopPoints(FSOUND_SAMPLE *sptr, int loopstart, int loopend); nuclear@0: DLL_API signed char F_API FSOUND_Sample_SetDefaults(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri); nuclear@0: DLL_API signed char F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max); nuclear@0: nuclear@0: // Sample information nuclear@0: DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno); nuclear@0: DLL_API char * F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr); nuclear@0: DLL_API unsigned int F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr); nuclear@0: DLL_API signed char F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend); nuclear@0: DLL_API signed char F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri); nuclear@0: DLL_API unsigned int F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr); nuclear@0: nuclear@0: // ============================ nuclear@0: // Channel control functions. nuclear@0: // ============================ nuclear@0: nuclear@0: // Playing and stopping sounds. nuclear@0: DLL_API int F_API FSOUND_PlaySound(int channel, FSOUND_SAMPLE *sptr); nuclear@0: DLL_API int F_API FSOUND_PlaySound3DAttrib(int channel, FSOUND_SAMPLE *sptr, int freq, int vol, int pan, float *pos, float *vel); nuclear@0: DLL_API signed char F_API FSOUND_StopSound(int channel); nuclear@0: nuclear@0: // Functions to control playback of a channel. nuclear@0: DLL_API signed char F_API FSOUND_SetFrequency(int channel, int freq); nuclear@0: DLL_API signed char F_API FSOUND_SetVolume(int channel, int vol); nuclear@0: DLL_API signed char F_API FSOUND_SetVolumeAbsolute(int channel, int vol); nuclear@0: DLL_API signed char F_API FSOUND_SetPan(int channel, int pan); nuclear@0: DLL_API signed char F_API FSOUND_SetSurround(int channel, signed char surround); nuclear@0: DLL_API signed char F_API FSOUND_SetMute(int channel, signed char mute); nuclear@0: DLL_API signed char F_API FSOUND_SetPriority(int channel, int priority); nuclear@0: DLL_API signed char F_API FSOUND_SetReserved(int channel, signed char reserved); nuclear@0: DLL_API signed char F_API FSOUND_SetPaused(int channel, signed char paused); nuclear@0: DLL_API signed char F_API FSOUND_SetLoopMode(int channel, unsigned int loopmode); nuclear@0: nuclear@0: // Channel information nuclear@0: DLL_API signed char F_API FSOUND_IsPlaying(int channel); nuclear@0: DLL_API int F_API FSOUND_GetFrequency(int channel); nuclear@0: DLL_API int F_API FSOUND_GetVolume(int channel); nuclear@0: DLL_API int F_API FSOUND_GetPan(int channel); nuclear@0: DLL_API signed char F_API FSOUND_GetSurround(int channel); nuclear@0: DLL_API signed char F_API FSOUND_GetMute(int channel); nuclear@0: DLL_API int F_API FSOUND_GetPriority(int channel); nuclear@0: DLL_API signed char F_API FSOUND_GetReserved(int channel); nuclear@0: DLL_API signed char F_API FSOUND_GetPaused(int channel); nuclear@0: DLL_API unsigned int F_API FSOUND_GetCurrentPosition(int channel); nuclear@0: DLL_API FSOUND_SAMPLE * F_API FSOUND_GetCurrentSample(int channel); nuclear@0: DLL_API float F_API FSOUND_GetCurrentVU(int channel); nuclear@0: nuclear@0: // =================== nuclear@0: // 3D sound functions. nuclear@0: // =================== nuclear@0: // see also FSOUND_PlaySound3DAttrib (above) nuclear@0: // see also FSOUND_Sample_SetMinMaxDistance (above) nuclear@0: DLL_API void F_API FSOUND_3D_Update(); nuclear@0: DLL_API signed char F_API FSOUND_3D_SetAttributes(int channel, float *pos, float *vel); nuclear@0: DLL_API signed char F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel); nuclear@0: 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); nuclear@0: 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); nuclear@0: DLL_API void F_API FSOUND_3D_Listener_SetDopplerFactor(float scale); nuclear@0: DLL_API void F_API FSOUND_3D_Listener_SetDistanceFactor(float scale); nuclear@0: DLL_API void F_API FSOUND_3D_Listener_SetRolloffFactor(float scale); nuclear@0: nuclear@0: // ========================= nuclear@0: // File Streaming functions. nuclear@0: // ========================= nuclear@0: nuclear@0: // Note : Use FSOUND_LOADMEMORY flag with FSOUND_Stream_OpenFile to stream from memory. nuclear@0: // Use FSOUND_LOADRAW flag with FSOUND_Stream_OpenFile to treat stream as raw pcm data. nuclear@0: // Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_OpenFile to open mpegs in 'accurate mode' for seeking etc. nuclear@0: nuclear@0: DLL_API FSOUND_STREAM * F_API FSOUND_Stream_OpenFile(const char *filename, unsigned int mode, int memlength); nuclear@0: DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, int userdata); nuclear@0: DLL_API int F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream); nuclear@0: DLL_API int F_API FSOUND_Stream_Play3DAttrib(int channel, FSOUND_STREAM *stream, int freq, int vol, int pan, float *pos, float *vel); nuclear@0: DLL_API signed char F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream); nuclear@0: DLL_API signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream); nuclear@0: DLL_API signed char F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata); nuclear@0: DLL_API signed char F_API FSOUND_Stream_SetSynchCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata); nuclear@0: DLL_API FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream); nuclear@0: DLL_API FSOUND_DSPUNIT *F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, int param); nuclear@0: nuclear@0: DLL_API signed char F_API FSOUND_Stream_SetPaused(FSOUND_STREAM *stream, signed char paused); nuclear@0: DLL_API signed char F_API FSOUND_Stream_GetPaused(FSOUND_STREAM *stream); nuclear@0: DLL_API signed char F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, int position); nuclear@0: DLL_API int F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream); nuclear@0: DLL_API signed char F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms); nuclear@0: DLL_API int F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream); nuclear@0: DLL_API int F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream); nuclear@0: DLL_API int F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream); nuclear@0: nuclear@0: // =================== nuclear@0: // CD audio functions. nuclear@0: // =================== nuclear@0: nuclear@0: DLL_API signed char F_API FSOUND_CD_Play(int track); nuclear@0: DLL_API void F_API FSOUND_CD_SetPlayMode(signed char mode); nuclear@0: DLL_API signed char F_API FSOUND_CD_Stop(); nuclear@0: DLL_API signed char F_API FSOUND_CD_SetPaused(signed char paused); nuclear@0: DLL_API signed char F_API FSOUND_CD_SetVolume(int volume); nuclear@0: DLL_API signed char F_API FSOUND_CD_Eject(); nuclear@0: nuclear@0: DLL_API signed char F_API FSOUND_CD_GetPaused(); nuclear@0: DLL_API int F_API FSOUND_CD_GetTrack(); nuclear@0: DLL_API int F_API FSOUND_CD_GetNumTracks(); nuclear@0: DLL_API int F_API FSOUND_CD_GetVolume(); nuclear@0: DLL_API int F_API FSOUND_CD_GetTrackLength(int track); nuclear@0: DLL_API int F_API FSOUND_CD_GetTrackTime(); nuclear@0: nuclear@0: nuclear@0: // ============== nuclear@0: // DSP functions. nuclear@0: // ============== nuclear@0: nuclear@0: // DSP Unit control and information functions. nuclear@0: DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, int param); nuclear@0: DLL_API void F_API FSOUND_DSP_Free(FSOUND_DSPUNIT *unit); nuclear@0: DLL_API void F_API FSOUND_DSP_SetPriority(FSOUND_DSPUNIT *unit, int priority); nuclear@0: DLL_API int F_API FSOUND_DSP_GetPriority(FSOUND_DSPUNIT *unit); nuclear@0: DLL_API void F_API FSOUND_DSP_SetActive(FSOUND_DSPUNIT *unit, signed char active); nuclear@0: DLL_API signed char F_API FSOUND_DSP_GetActive(FSOUND_DSPUNIT *unit); nuclear@0: nuclear@0: // Functions to get hold of FSOUND 'system DSP unit' handles. nuclear@0: DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClearUnit(); nuclear@0: DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetSFXUnit(); nuclear@0: DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetMusicUnit(); nuclear@0: DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_GetClipAndCopyUnit(); nuclear@0: nuclear@0: // misc DSP functions nuclear@0: DLL_API signed char F_API FSOUND_DSP_MixBuffers(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode); nuclear@0: DLL_API void F_API FSOUND_DSP_ClearMixBuffer(); nuclear@0: DLL_API int F_API FSOUND_DSP_GetBufferLength(); nuclear@0: nuclear@0: // ============================================= nuclear@0: // Geometry functions. (NOT SUPPORTED IN LINUX) nuclear@0: // ============================================= nuclear@0: nuclear@0: // scene/polygon functions nuclear@0: DLL_API signed char F_API FSOUND_Geometry_AddPolygon(float *p1, float *p2, float *p3, float *p4, float *normal, unsigned int mode, float *openingfactor); nuclear@0: DLL_API int F_API FSOUND_Geometry_AddList(FSOUND_GEOMLIST *geomlist); nuclear@0: nuclear@0: // polygon list functions nuclear@0: DLL_API FSOUND_GEOMLIST * F_API FSOUND_Geometry_List_Create(signed char boundingvolume); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_List_Free(FSOUND_GEOMLIST *geomlist); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_List_Begin(FSOUND_GEOMLIST *geomlist); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_List_End(FSOUND_GEOMLIST *geomlist); nuclear@0: nuclear@0: // material functions nuclear@0: DLL_API FSOUND_MATERIAL * F_API FSOUND_Geometry_Material_Create(); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_Material_Free(FSOUND_MATERIAL *material); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_Material_SetAttributes(FSOUND_MATERIAL *material, float reflectancegain, float reflectancefreq, float transmittancegain, float transmittancefreq); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_Material_GetAttributes(FSOUND_MATERIAL *material, float *reflectancegain, float *reflectancefreq, float *transmittancegain, float *transmittancefreq); nuclear@0: DLL_API signed char F_API FSOUND_Geometry_Material_Set(FSOUND_MATERIAL *material); nuclear@0: nuclear@0: // ======================================================================== nuclear@0: // Reverb functions. (eax, eax2, a3d 3.0 reverb) (NOT SUPPORTED IN LINUX) nuclear@0: // ======================================================================== nuclear@0: nuclear@0: // eax1, eax2, a3d 3.0 (use FSOUND_REVERB_PRESETS if you like), (eax2 support through emulation/parameter conversion) nuclear@0: DLL_API signed char F_API FSOUND_Reverb_SetEnvironment(int env, float vol, float decay, float damp); nuclear@0: // eax2, a3d 3.0 only, does not work on eax1 nuclear@0: DLL_API signed char F_API FSOUND_Reverb_SetEnvironmentAdvanced( nuclear@0: int env, nuclear@0: int Room, // [-10000, 0] default: -10000 mB or use FSOUND_REVERB_IGNOREPARAM nuclear@0: int RoomHF, // [-10000, 0] default: 0 mB or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float RoomRolloffFactor, // [0.0, 10.0] default: 0.0 or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float DecayTime, // [0.1, 20.0] default: 1.0 s or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float DecayHFRatio, // [0.1, 2.0] default: 0.5 or use FSOUND_REVERB_IGNOREPARAM nuclear@0: int Reflections, // [-10000, 1000] default: -10000 mB or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float ReflectionsDelay, // [0.0, 0.3] default: 0.02 s or use FSOUND_REVERB_IGNOREPARAM nuclear@0: int Reverb, // [-10000, 2000] default: -10000 mB or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float ReverbDelay, // [0.0, 0.1] default: 0.04 s or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float EnvironmentSize, // [0.0, 100.0] default: 100.0 % or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float EnvironmentDiffusion, // [0.0, 100.0] default: 100.0 % or use FSOUND_REVERB_IGNOREPARAM nuclear@0: float AirAbsorptionHF); // [20.0, 20000.0] default: 5000.0 Hz or use FSOUND_REVERB_IGNOREPARAM nuclear@0: nuclear@0: DLL_API signed char F_API FSOUND_Reverb_SetMix(int channel, float mix); nuclear@0: nuclear@0: // information functions nuclear@0: DLL_API signed char F_API FSOUND_Reverb_GetEnvironment(int *env, float *vol, float *decay, float *damp); nuclear@0: DLL_API signed char F_API FSOUND_Reverb_GetEnvironmentAdvanced( nuclear@0: int *env, nuclear@0: int *Room, nuclear@0: int *RoomHF, nuclear@0: float *RoomRolloffFactor, nuclear@0: float *DecayTime, nuclear@0: float *DecayHFRatio, nuclear@0: int *Reflections, nuclear@0: float *ReflectionsDelay, nuclear@0: int *Reverb, nuclear@0: float *ReverbDelay, nuclear@0: float *EnvironmentSize, nuclear@0: float *EnvironmentDiffusion, nuclear@0: float *AirAbsorptionHF); nuclear@0: DLL_API signed char F_API FSOUND_Reverb_GetMix(int channel, float *mix); nuclear@0: nuclear@0: // ============================================= nuclear@0: // Recording functions (NOT SUPPORTED IN LINUX) nuclear@0: // ============================================= nuclear@0: nuclear@0: // recording initialization functions nuclear@0: DLL_API signed char F_API FSOUND_Record_SetDriver(int outputtype); nuclear@0: DLL_API int F_API FSOUND_Record_GetNumDrivers(); nuclear@0: DLL_API signed char * F_API FSOUND_Record_GetDriverName(int id); nuclear@0: DLL_API int F_API FSOUND_Record_GetDriver(); nuclear@0: nuclear@0: // recording functionality. Only one recording session will work at a time nuclear@0: DLL_API signed char F_API FSOUND_Record_StartSample(FSOUND_SAMPLE *sptr, signed char loop);// record to sample nuclear@0: DLL_API signed char F_API FSOUND_Record_Stop(); // stop recording nuclear@0: DLL_API int F_API FSOUND_Record_GetPosition(); // offset in sample, or wav file nuclear@0: nuclear@0: // ========================= nuclear@0: // File system override nuclear@0: // ========================= nuclear@0: nuclear@0: DLL_API void F_API FSOUND_File_SetCallbacks(unsigned int (_cdecl *OpenCallback)(const char *name), nuclear@0: void (_cdecl *CloseCallback)(unsigned int handle), nuclear@0: int (_cdecl *ReadCallback)(void *buffer, int size, unsigned int handle), nuclear@0: int (_cdecl *SeekCallback)(unsigned int handle, int pos, signed char mode), nuclear@0: int (_cdecl *TellCallback)(unsigned int handle)); nuclear@0: nuclear@0: // ============================================================================================= nuclear@0: // FMUSIC API nuclear@0: // ============================================================================================= nuclear@0: nuclear@0: // Song management / playback functions. nuclear@0: DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name); nuclear@0: DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongMemory(void *data, int length); nuclear@0: DLL_API signed char F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod); nuclear@0: DLL_API signed char F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod); nuclear@0: DLL_API signed char F_API FMUSIC_StopSong(FMUSIC_MODULE *mod); nuclear@0: DLL_API void F_API FMUSIC_StopAllSongs(); nuclear@0: DLL_API signed char F_API FMUSIC_SetZxxCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback); nuclear@0: DLL_API signed char F_API FMUSIC_SetRowCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep); nuclear@0: DLL_API signed char F_API FMUSIC_SetOrderCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep); nuclear@0: DLL_API signed char F_API FMUSIC_SetInstCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument); nuclear@0: DLL_API signed char F_API FMUSIC_SetSample(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr); nuclear@0: DLL_API signed char F_API FMUSIC_OptimizeChannels(FMUSIC_MODULE *mod, int maxchannels, int minvolume); nuclear@0: nuclear@0: // Runtime song functions. nuclear@0: DLL_API signed char F_API FMUSIC_SetReverb(signed char reverb); // MIDI only. nuclear@0: DLL_API signed char F_API FMUSIC_SetOrder(FMUSIC_MODULE *mod, int order); nuclear@0: DLL_API signed char F_API FMUSIC_SetPaused(FMUSIC_MODULE *mod, signed char pause); nuclear@0: DLL_API signed char F_API FMUSIC_SetMasterVolume(FMUSIC_MODULE *mod, int volume); nuclear@0: DLL_API signed char F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float pansep); nuclear@0: nuclear@0: // Static song information functions. nuclear@0: DLL_API char * F_API FMUSIC_GetName(FMUSIC_MODULE *mod); nuclear@0: DLL_API signed char F_API FMUSIC_GetType(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetNumInstruments(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetNumSamples(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetNumChannels(FMUSIC_MODULE *mod); nuclear@0: DLL_API FSOUND_SAMPLE * F_API FMUSIC_GetSample(FMUSIC_MODULE *mod, int sampno); nuclear@0: DLL_API int F_API FMUSIC_GetPatternLength(FMUSIC_MODULE *mod, int orderno); nuclear@0: nuclear@0: // Runtime song information. nuclear@0: DLL_API signed char F_API FMUSIC_IsFinished(FMUSIC_MODULE *mod); nuclear@0: DLL_API signed char F_API FMUSIC_IsPlaying(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetMasterVolume(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetGlobalVolume(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetOrder(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetPattern(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetSpeed(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetBPM(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetRow(FMUSIC_MODULE *mod); nuclear@0: DLL_API signed char F_API FMUSIC_GetPaused(FMUSIC_MODULE *mod); nuclear@0: DLL_API int F_API FMUSIC_GetTime(FMUSIC_MODULE *mod); nuclear@0: nuclear@0: #ifdef __cplusplus nuclear@0: } nuclear@0: #endif nuclear@0: nuclear@0: #endif