diff --git a/OpenJPOG/premake5.lua b/OpenJPOG/premake5.lua index 3d588ed..2baed04 100644 --- a/OpenJPOG/premake5.lua +++ b/OpenJPOG/premake5.lua @@ -8,7 +8,8 @@ project ("OpenJPOG") "TKernelInterface", "TApplication", "libtheora", - "theoraplay" + "theoraplay", + "fmodvc.lib" } files @@ -33,7 +34,7 @@ project ("OpenJPOG") "%{LibDir.fmod}" } - prebuildcommands + postbuildcommands { "{COPY} \"%{wks.location}bin/" .. outputdir .. "/TKernelInterface/TKernelInterface.dll\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}\"", "{COPY} \"%{wks.location}bin/" .. outputdir .. "/TApplication/TApplication.dll\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}\"", diff --git a/Toshi/vendor/fmod/include/fmod.h b/Toshi/vendor/fmod/include/fmod.h index 7c8ea10..b965593 100644 --- a/Toshi/vendor/fmod/include/fmod.h +++ b/Toshi/vendor/fmod/include/fmod.h @@ -1,29 +1,30 @@ /* ========================================================================================== */ -/* FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd 1999-2002. */ +/* FMOD Main header file. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004. */ /* ========================================================================================== */ #ifndef _FMOD_H_ #define _FMOD_H_ -#ifdef _MSC_VER - #pragma comment (lib, "fmodvc.lib") -#endif - /* ========================================================================================== */ /* DEFINITIONS */ /* ========================================================================================== */ -#if (!defined(WIN32) && !defined(__WIN32__) && !defined(_WIN32_WCE)) || (defined(__GNUC__) && defined(WIN32)) - #ifndef _cdecl - #define _cdecl +#if (!defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(_WIN64) && !defined(_WIN32_WCE) && !defined(_XBOX)) || (defined(__GNUC__) && defined(WIN32)) + #ifndef __cdecl + #define __cdecl #endif - #ifndef _stdcall - #define _stdcall + #ifndef __stdcall + #define __stdcall #endif #endif -#define F_API _stdcall -#define F_CALLBACKAPI _cdecl +#if defined(_WIN32_WCE) + #define F_API _cdecl + #define F_CALLBACKAPI _cdecl +#else + #define F_API __stdcall + #define F_CALLBACKAPI __stdcall +#endif #ifdef DLL_EXPORTS #define DLL_API __declspec(dllexport) @@ -35,7 +36,7 @@ #endif /* __LCC__ || __MINGW32__ || __CYGWIN32__ */ #endif /* DLL_EXPORTS */ -#define FMOD_VERSION 3.61f +#define FMOD_VERSION 3.75f /* FMOD defined types @@ -43,24 +44,26 @@ typedef struct FSOUND_SAMPLE FSOUND_SAMPLE; typedef struct FSOUND_STREAM FSOUND_STREAM; typedef struct FSOUND_DSPUNIT FSOUND_DSPUNIT; +typedef struct FSOUND_SYNCPOINT FSOUND_SYNCPOINT; typedef struct FMUSIC_MODULE FMUSIC_MODULE; /* Callback types */ -typedef void * (F_CALLBACKAPI *FSOUND_DSPCALLBACK) (void *originalbuffer, void *newbuffer, int length, int param); -typedef signed char (F_CALLBACKAPI *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, int param); -typedef void (F_CALLBACKAPI *FMUSIC_CALLBACK) (FMUSIC_MODULE *mod, unsigned char param); +typedef void * (F_CALLBACKAPI *FSOUND_OPENCALLBACK) (const char *name); +typedef void (F_CALLBACKAPI *FSOUND_CLOSECALLBACK) (void *handle); +typedef int (F_CALLBACKAPI *FSOUND_READCALLBACK) (void *buffer, int size, void *handle); +typedef int (F_CALLBACKAPI *FSOUND_SEEKCALLBACK) (void *handle, int pos, signed char mode); +typedef int (F_CALLBACKAPI *FSOUND_TELLCALLBACK) (void *handle); -typedef unsigned int(F_CALLBACKAPI *FSOUND_OPENCALLBACK) (const char *name); -typedef void (F_CALLBACKAPI *FSOUND_CLOSECALLBACK) (unsigned int handle); -typedef int (F_CALLBACKAPI *FSOUND_READCALLBACK) (void *buffer, int size, unsigned int handle); -typedef int (F_CALLBACKAPI *FSOUND_SEEKCALLBACK) (unsigned int handle, int pos, signed char mode); -typedef int (F_CALLBACKAPI *FSOUND_TELLCALLBACK) (unsigned int handle); +typedef void * (F_CALLBACKAPI *FSOUND_ALLOCCALLBACK) (unsigned int size); +typedef void * (F_CALLBACKAPI *FSOUND_REALLOCCALLBACK) (void *ptr, unsigned int size); +typedef void (F_CALLBACKAPI *FSOUND_FREECALLBACK) (void *ptr); -typedef void * (F_CALLBACKAPI *FSOUND_ALLOCCALLBACK) (unsigned int size); -typedef void * (F_CALLBACKAPI *FSOUND_REALLOCCALLBACK)(void *ptr, unsigned int size); -typedef void (F_CALLBACKAPI *FSOUND_FREECALLBACK) (void *ptr); +typedef void * (F_CALLBACKAPI *FSOUND_DSPCALLBACK) (void *originalbuffer, void *newbuffer, int length, void *userdata); +typedef signed char (F_CALLBACKAPI *FSOUND_STREAMCALLBACK) (FSOUND_STREAM *stream, void *buff, int len, void *userdata); +typedef signed char (F_CALLBACKAPI *FSOUND_METADATACALLBACK)(char *name, char *value, void *userdata); +typedef void (F_CALLBACKAPI *FMUSIC_CALLBACK) (FMUSIC_MODULE *mod, unsigned char param); /* @@ -130,6 +133,7 @@ enum FSOUND_OUTPUTTYPES FSOUND_OUTPUT_PS2, /* PlayStation 2 driver */ FSOUND_OUTPUT_MAC, /* Mac SoundManager driver */ FSOUND_OUTPUT_GC, /* Gamecube driver */ + FSOUND_OUTPUT_PSP, /* PlayStation Portable driver */ FSOUND_OUTPUT_NOSOUND_NONREALTIME /* This is the same as nosound, but the sound generation is driven by FSOUND_Update */ }; @@ -184,7 +188,8 @@ enum FMUSIC_TYPES FMUSIC_TYPE_S3M, /* ScreamTracker 3 */ FMUSIC_TYPE_XM, /* FastTracker 2 */ FMUSIC_TYPE_IT, /* Impulse Tracker. */ - FMUSIC_TYPE_MIDI /* MIDI file */ + FMUSIC_TYPE_MIDI, /* MIDI file */ + FMUSIC_TYPE_FSB /* FMOD Sample Bank file */ }; @@ -209,7 +214,7 @@ enum FMUSIC_TYPES #define FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT 0 /* DSP CLEAR unit - done first */ #define FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT 100 /* DSP SFX unit - done second */ #define FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT 200 /* DSP MUSIC unit - done third */ -#define FSOUND_DSP_DEFAULTPRIORITY_USER 300 /* User priority, use this as reference */ +#define FSOUND_DSP_DEFAULTPRIORITY_USER 300 /* User priority, use this as reference for your own DSP units */ #define FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT 900 /* This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units */ #define FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT 1000 /* DSP CLIP AND COPY unit - last */ /* [DEFINE_END] */ @@ -250,46 +255,48 @@ enum FMUSIC_TYPES example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS. It will just ignore the flag and go ahead loading it as 8bits. For these type of formats the only flags you can specify that will really alter the behaviour of how it is loaded, are the following. - - FSOUND_LOOP_OFF - FSOUND_LOOP_NORMAL - FSOUND_LOOP_BIDI - FSOUND_HW3D - FSOUND_2D - FSOUND_STREAMABLE - FSOUND_LOADMEMORY - FSOUND_LOADRAW - FSOUND_MPEGACCURATE - + --------- + Looping behaviour - FSOUND_LOOP_OFF, FSOUND_LOOP_NORMAL, FSOUND_LOOP_BIDI + Load destination - FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D + Loading behaviour - FSOUND_NONBLOCKING, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_MPEGHALFRATE, FSOUND_FORCEMONO + Playback behaviour - FSOUND_STREAMABLE, FSOUND_ENABLEFX + PlayStation 2 only - FSOUND_USECORE0, FSOUND_USECORE1, FSOUND_LOADMEMORYIOP + --------- See flag descriptions for what these do. ] */ -#define FSOUND_LOOP_OFF 0x00000001 /* For non looping samples. */ -#define FSOUND_LOOP_NORMAL 0x00000002 /* For forward looping samples. */ -#define FSOUND_LOOP_BIDI 0x00000004 /* For bidirectional looping samples. (no effect if in hardware). */ -#define FSOUND_8BITS 0x00000008 /* For 8 bit samples. */ -#define FSOUND_16BITS 0x00000010 /* For 16 bit samples. */ -#define FSOUND_MONO 0x00000020 /* For mono samples. */ -#define FSOUND_STEREO 0x00000040 /* For stereo samples. */ -#define FSOUND_UNSIGNED 0x00000080 /* For user created source data containing unsigned samples. */ -#define FSOUND_SIGNED 0x00000100 /* For user created source data containing signed data. */ -#define FSOUND_DELTA 0x00000200 /* For user created source data stored as delta values. */ -#define FSOUND_IT214 0x00000400 /* For user created source data stored using IT214 compression. */ -#define FSOUND_IT215 0x00000800 /* For user created source data stored using IT215 compression. */ -#define FSOUND_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */ -#define FSOUND_2D 0x00002000 /* Tells software (not hardware) based sample not to be included in 3d processing. */ -#define FSOUND_STREAMABLE 0x00004000 /* For a streamimg sound where you feed the data to it. */ -#define FSOUND_LOADMEMORY 0x00008000 /* "name" will be interpreted as a pointer to data for streaming and samples. */ -#define FSOUND_LOADRAW 0x00010000 /* Will ignore file format and treat as raw pcm. */ -#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. */ -#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 */ -#define FSOUND_HW2D 0x00080000 /* 2D hardware sounds. allows hardware specific effects */ -#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 */ -#define FSOUND_MPEGHALFRATE 0x00200000 /* For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution */ -#define FSOUND_XADPCM 0x00400000 /* For XBOX only - Contents are compressed as XADPCM */ -#define FSOUND_VAG 0x00800000 /* For PS2 only - Contents are compressed as Sony VAG format */ -#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. */ -#define FSOUND_GCADPCM 0x02000000 /* For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format */ +#define FSOUND_LOOP_OFF 0x00000001 /* For non looping samples. */ +#define FSOUND_LOOP_NORMAL 0x00000002 /* For forward looping samples. */ +#define FSOUND_LOOP_BIDI 0x00000004 /* For bidirectional looping samples. (no effect if in hardware). */ +#define FSOUND_8BITS 0x00000008 /* For 8 bit samples. */ +#define FSOUND_16BITS 0x00000010 /* For 16 bit samples. */ +#define FSOUND_MONO 0x00000020 /* For mono samples. */ +#define FSOUND_STEREO 0x00000040 /* For stereo samples. */ +#define FSOUND_UNSIGNED 0x00000080 /* For user created source data containing unsigned samples. */ +#define FSOUND_SIGNED 0x00000100 /* For user created source data containing signed data. */ +#define FSOUND_DELTA 0x00000200 /* For user created source data stored as delta values. */ +#define FSOUND_IT214 0x00000400 /* For user created source data stored using IT214 compression. */ +#define FSOUND_IT215 0x00000800 /* For user created source data stored using IT215 compression. */ +#define FSOUND_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */ +#define FSOUND_2D 0x00002000 /* Tells software (not hardware) based sample not to be included in 3d processing. */ +#define FSOUND_STREAMABLE 0x00004000 /* For a streamimg sound where you feed the data to it. */ +#define FSOUND_LOADMEMORY 0x00008000 /* "name" will be interpreted as a pointer to data for streaming and samples. */ +#define FSOUND_LOADRAW 0x00010000 /* Will ignore file format and treat as raw pcm. */ +#define FSOUND_MPEGACCURATE 0x00020000 /* For FSOUND_Stream_Open - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime. WARNING, see FSOUND_Stream_Open for inital opening time performance issues. */ +#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 */ +#define FSOUND_HW2D 0x00080000 /* 2D hardware sounds. allows hardware specific effects */ +#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 */ +#define FSOUND_MPEGHALFRATE 0x00200000 /* For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution */ +#define FSOUND_IMAADPCM 0x00400000 /* Contents are stored compressed as IMA ADPCM */ +#define FSOUND_VAG 0x00800000 /* For PS2 only - Contents are compressed as Sony VAG format */ +#define FSOUND_NONBLOCKING 0x01000000 /* For FSOUND_Stream_Open/FMUSIC_LoadSong - Causes stream or music to open in the background and not block the foreground app. See FSOUND_Stream_GetOpenState or FMUSIC_GetOpenState to determine when it IS ready. */ +#define FSOUND_GCADPCM 0x02000000 /* For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format */ +#define FSOUND_MULTICHANNEL 0x04000000 /* For PS2 and Gamecube only - Contents are interleaved into a multi-channel (more than stereo) format */ +#define FSOUND_USECORE0 0x08000000 /* For PS2 only - Sample/Stream is forced to use hardware voices 00-23 */ +#define FSOUND_USECORE1 0x10000000 /* For PS2 only - Sample/Stream is forced to use hardware voices 24-47 */ +#define FSOUND_LOADMEMORYIOP 0x20000000 /* For PS2 only - "name" will be interpreted as a pointer to data for streaming and samples. The address provided will be an IOP address */ +#define FSOUND_IGNORETAGS 0x40000000 /* Skips id3v2 etc tag checks when opening a stream, to reduce seek/read overhead when opening files (helps with CD performance) */ +#define FSOUND_STREAM_NET 0x80000000 /* Specifies an internet stream */ #define FSOUND_NORMAL (FSOUND_16BITS | FSOUND_SIGNED | FSOUND_MONO) /* [DEFINE_END] */ @@ -352,15 +359,11 @@ enum FMUSIC_TYPES For more indepth descriptions of the reverb properties under win32, please see the EAX2 and EAX3 documentation at http://developer.creative.com/ under the 'downloads' section. If they do not have the EAX3 documentation, then most information can be attained from - the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of - EAX2. + the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of EAX2. Note the default reverb properties are the same as the FSOUND_PRESET_GENERIC preset. - Note that integer values that typically range from -10,000 to 1000 are represented in - decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear. + Note that integer values that typically range from -10,000 to 1000 are represented in decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear. PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). - Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then - the reverb should product a similar effect on either platform. - Only Win32 supports the reverb api. + Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then the reverb should product a similar effect on either platform. The numerical values listed below are the maximum, minimum and default values for each variable respectively. @@ -373,32 +376,32 @@ enum FMUSIC_TYPES */ typedef struct _FSOUND_REVERB_PROPERTIES /* MIN MAX DEFAULT DESCRIPTION */ { - unsigned int Environment; /* 0 , 25 , 0 , sets all listener properties (win32/ps2 only) */ - float EnvSize; /* 1.0 , 100.0 , 7.5 , environment size in meters (win32 only) */ - float EnvDiffusion; /* 0.0 , 1.0 , 1.0 , environment diffusion (win32/xbox) */ - int Room; /* -10000, 0 , -1000 , room effect level (at mid frequencies) (win32/xbox/ps2) */ - int RoomHF; /* -10000, 0 , -100 , relative room effect level at high frequencies (win32/xbox) */ - int RoomLF; /* -10000, 0 , 0 , relative room effect level at low frequencies (win32 only) */ - float DecayTime; /* 0.1 , 20.0 , 1.49 , reverberation decay time at mid frequencies (win32/xbox) */ - float DecayHFRatio; /* 0.1 , 2.0 , 0.83 , high-frequency to mid-frequency decay time ratio (win32/xbox) */ - float DecayLFRatio; /* 0.1 , 2.0 , 1.0 , low-frequency to mid-frequency decay time ratio (win32 only) */ - int Reflections; /* -10000, 1000 , -2602 , early reflections level relative to room effect (win32/xbox) */ - float ReflectionsDelay; /* 0.0 , 0.3 , 0.007 , initial reflection delay time (win32/xbox) */ - float ReflectionsPan[3]; /* , , [0,0,0], early reflections panning vector (win32 only) */ - int Reverb; /* -10000, 2000 , 200 , late reverberation level relative to room effect (win32/xbox) */ - float ReverbDelay; /* 0.0 , 0.1 , 0.011 , late reverberation delay time relative to initial reflection (win32/xbox) */ - float ReverbPan[3]; /* , , [0,0,0], late reverberation panning vector (win32 only) */ - float EchoTime; /* .075 , 0.25 , 0.25 , echo time (win32 only) */ - float EchoDepth; /* 0.0 , 1.0 , 0.0 , echo depth (win32 only) */ - float ModulationTime; /* 0.04 , 4.0 , 0.25 , modulation time (win32 only) */ - float ModulationDepth; /* 0.0 , 1.0 , 0.0 , modulation depth (win32 only) */ - float AirAbsorptionHF; /* -100 , 0.0 , -5.0 , change in level per meter at high frequencies (win32 only) */ - float HFReference; /* 1000.0, 20000 , 5000.0 , reference high frequency (hz) (win32/xbox) */ - float LFReference; /* 20.0 , 1000.0, 250.0 , reference low frequency (hz) (win32 only) */ - float RoomRolloffFactor; /* 0.0 , 10.0 , 0.0 , like FSOUND_3D_SetRolloffFactor but for room effect (win32/xbox) */ - float Diffusion; /* 0.0 , 100.0 , 100.0 , Value that controls the echo density in the late reverberation decay. (xbox only) */ - float Density; /* 0.0 , 100.0 , 100.0 , Value that controls the modal density in the late reverberation decay (xbox only) */ - unsigned int Flags; /* FSOUND_REVERB_FLAGS - modifies the behavior of above properties (win32 only) */ + unsigned int Environment; /* 0 , 25 , 0 , sets all listener properties (WIN32/PS2 only) */ + float EnvSize; /* 1.0 , 100.0 , 7.5 , environment size in meters (WIN32 only) */ + float EnvDiffusion; /* 0.0 , 1.0 , 1.0 , environment diffusion (WIN32/XBOX) */ + int Room; /* -10000, 0 , -1000 , room effect level (at mid frequencies) (WIN32/XBOX/PS2) */ + int RoomHF; /* -10000, 0 , -100 , relative room effect level at high frequencies (WIN32/XBOX) */ + int RoomLF; /* -10000, 0 , 0 , relative room effect level at low frequencies (WIN32 only) */ + float DecayTime; /* 0.1 , 20.0 , 1.49 , reverberation decay time at mid frequencies (WIN32/XBOX) */ + float DecayHFRatio; /* 0.1 , 2.0 , 0.83 , high-frequency to mid-frequency decay time ratio (WIN32/XBOX) */ + float DecayLFRatio; /* 0.1 , 2.0 , 1.0 , low-frequency to mid-frequency decay time ratio (WIN32 only) */ + int Reflections; /* -10000, 1000 , -2602 , early reflections level relative to room effect (WIN32/XBOX) */ + float ReflectionsDelay; /* 0.0 , 0.3 , 0.007 , initial reflection delay time (WIN32/XBOX) */ + float ReflectionsPan[3]; /* , , [0,0,0], early reflections panning vector (WIN32 only) */ + int Reverb; /* -10000, 2000 , 200 , late reverberation level relative to room effect (WIN32/XBOX) */ + float ReverbDelay; /* 0.0 , 0.1 , 0.011 , late reverberation delay time relative to initial reflection (WIN32/XBOX) */ + float ReverbPan[3]; /* , , [0,0,0], late reverberation panning vector (WIN32 only) */ + float EchoTime; /* .075 , 0.25 , 0.25 , echo time (WIN32/PS2 only. PS2 = Delay time for ECHO/DELAY modes only) */ + float EchoDepth; /* 0.0 , 1.0 , 0.0 , echo depth (WIN32/PS2 only. PS2 = Feedback level for ECHO mode only) */ + float ModulationTime; /* 0.04 , 4.0 , 0.25 , modulation time (WIN32 only) */ + float ModulationDepth; /* 0.0 , 1.0 , 0.0 , modulation depth (WIN32 only) */ + float AirAbsorptionHF; /* -100 , 0.0 , -5.0 , change in level per meter at high frequencies (WIN32 only) */ + float HFReference; /* 1000.0, 20000 , 5000.0 , reference high frequency (hz) (WIN32/XBOX) */ + float LFReference; /* 20.0 , 1000.0, 250.0 , reference low frequency (hz) (WIN32 only) */ + float RoomRolloffFactor; /* 0.0 , 10.0 , 0.0 , like FSOUND_3D_SetRolloffFactor but for room effect (WIN32/XBOX) */ + float Diffusion; /* 0.0 , 100.0 , 100.0 , Value that controls the echo density in the late reverberation decay. (XBOX only) */ + float Density; /* 0.0 , 100.0 , 100.0 , Value that controls the modal density in the late reverberation decay (XBOX only) */ + unsigned int Flags; /* FSOUND_REVERB_FLAGS - modifies the behavior of above properties (WIN32/PS2 only) */ } FSOUND_REVERB_PROPERTIES; @@ -486,7 +489,7 @@ typedef struct _FSOUND_REVERB_PROPERTIES /* MIN MAX DEFAULT DESCRIPTION #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 } #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 } -/* PlayStation 2 Only presets */ +/* PlayStation 2 and PlayStation Portable only presets */ #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 } #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 } @@ -530,24 +533,24 @@ typedef struct _FSOUND_REVERB_PROPERTIES /* MIN MAX DEFAULT DESCRIPTION */ typedef struct _FSOUND_REVERB_CHANNELPROPERTIES /* MIN MAX DEFAULT */ { - int Direct; /* -10000, 1000, 0, direct path level (at low and mid frequencies) (win32/xbox) */ - int DirectHF; /* -10000, 0, 0, relative direct path level at high frequencies (win32/xbox) */ - int Room; /* -10000, 1000, 0, room effect level (at low and mid frequencies) (win32/xbox) */ - int RoomHF; /* -10000, 0, 0, relative room effect level at high frequencies (win32/xbox) */ - int Obstruction; /* -10000, 0, 0, main obstruction control (attenuation at high frequencies) (win32/xbox) */ - float ObstructionLFRatio; /* 0.0, 1.0, 0.0, obstruction low-frequency level re. main control (win32/xbox) */ - int Occlusion; /* -10000, 0, 0, main occlusion control (attenuation at high frequencies) (win32/xbox) */ - float OcclusionLFRatio; /* 0.0, 1.0, 0.25, occlusion low-frequency level re. main control (win32/xbox) */ - float OcclusionRoomRatio; /* 0.0, 10.0, 1.5, relative occlusion control for room effect (win32) */ - float OcclusionDirectRatio; /* 0.0, 10.0, 1.0, relative occlusion control for direct path (win32) */ - int Exclusion; /* -10000, 0, 0, main exlusion control (attenuation at high frequencies) (win32) */ - float ExclusionLFRatio; /* 0.0, 1.0, 1.0, exclusion low-frequency level re. main control (win32) */ - int OutsideVolumeHF; /* -10000, 0, 0, outside sound cone level at high frequencies (win32) */ - float DopplerFactor; /* 0.0, 10.0, 0.0, like DS3D flDopplerFactor but per source (win32) */ - float RolloffFactor; /* 0.0, 10.0, 0.0, like DS3D flRolloffFactor but per source (win32) */ - float RoomRolloffFactor; /* 0.0, 10.0, 0.0, like DS3D flRolloffFactor but for room effect (win32/xbox) */ - float AirAbsorptionFactor; /* 0.0, 10.0, 1.0, multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (win32) */ - int Flags; /* FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (win32) */ + int Direct; /* -10000, 1000, 0, direct path level (at low and mid frequencies) (WIN32/XBOX) */ + int DirectHF; /* -10000, 0, 0, relative direct path level at high frequencies (WIN32/XBOX) */ + int Room; /* -10000, 1000, 0, room effect level (at low and mid frequencies) (WIN32/XBOX/PS2) */ + int RoomHF; /* -10000, 0, 0, relative room effect level at high frequencies (WIN32/XBOX) */ + int Obstruction; /* -10000, 0, 0, main obstruction control (attenuation at high frequencies) (WIN32/XBOX) */ + float ObstructionLFRatio; /* 0.0, 1.0, 0.0, obstruction low-frequency level re. main control (WIN32/XBOX) */ + int Occlusion; /* -10000, 0, 0, main occlusion control (attenuation at high frequencies) (WIN32/XBOX) */ + float OcclusionLFRatio; /* 0.0, 1.0, 0.25, occlusion low-frequency level re. main control (WIN32/XBOX) */ + float OcclusionRoomRatio; /* 0.0, 10.0, 1.5, relative occlusion control for room effect (WIN32) */ + float OcclusionDirectRatio; /* 0.0, 10.0, 1.0, relative occlusion control for direct path (WIN32) */ + int Exclusion; /* -10000, 0, 0, main exlusion control (attenuation at high frequencies) (WIN32) */ + float ExclusionLFRatio; /* 0.0, 1.0, 1.0, exclusion low-frequency level re. main control (WIN32) */ + int OutsideVolumeHF; /* -10000, 0, 0, outside sound cone level at high frequencies (WIN32) */ + float DopplerFactor; /* 0.0, 10.0, 0.0, like DS3D flDopplerFactor but per source (WIN32) */ + float RolloffFactor; /* 0.0, 10.0, 0.0, like DS3D flRolloffFactor but per source (WIN32) */ + float RoomRolloffFactor; /* 0.0, 10.0, 0.0, like DS3D flRolloffFactor but for room effect (WIN32/XBOX) */ + float AirAbsorptionFactor; /* 0.0, 10.0, 1.0, multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES (WIN32) */ + int Flags; /* FSOUND_REVERB_CHANNELFLAGS - modifies the behavior of properties (WIN32) */ } FSOUND_REVERB_CHANNELPROPERTIES; @@ -615,8 +618,6 @@ enum FSOUND_FX_MODES These are speaker types defined for use with the FSOUND_SetSpeakerMode command. Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo. - Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only - interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo. Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure. @@ -627,13 +628,15 @@ enum FSOUND_FX_MODES */ enum FSOUND_SPEAKERMODES { - FSOUND_SPEAKERMODE_DOLBYDIGITAL, /* The audio is played through a speaker arrangement of surround speakers with a subwoofer. */ - FSOUND_SPEAKERMODE_HEADPHONES, /* The speakers are headphones. */ - FSOUND_SPEAKERMODE_MONO, /* The speakers are monaural. */ - FSOUND_SPEAKERMODE_QUAD, /* The speakers are quadraphonic. */ - FSOUND_SPEAKERMODE_STEREO, /* The speakers are stereo (default value). */ - FSOUND_SPEAKERMODE_SURROUND, /* The speakers are surround sound. */ - FSOUND_SPEAKERMODE_DTS /* (XBOX Only) The audio is played through a speaker arrangement of surround speakers with a subwoofer. */ + FSOUND_SPEAKERMODE_DOLBYDIGITAL, /* Dolby Digital Output (XBOX or PC only). */ + FSOUND_SPEAKERMODE_HEADPHONES, /* The speakers are headphones. */ + FSOUND_SPEAKERMODE_MONO, /* The speakers are monaural. */ + FSOUND_SPEAKERMODE_QUAD, /* The speakers are quadraphonic. */ + FSOUND_SPEAKERMODE_STEREO, /* The speakers are stereo (default value). */ + FSOUND_SPEAKERMODE_SURROUND, /* The speakers are surround sound. */ + FSOUND_SPEAKERMODE_DTS, /* DTS output (XBOX only). */ + FSOUND_SPEAKERMODE_PROLOGIC2, /* Dolby Prologic 2. Playstation 2 and Gamecube only. PlayStation 2 doesnt support interior panning, but supports 48 voices simultaneously. */ + FSOUND_SPEAKERMODE_PROLOGIC2_INTERIOR /* Dolby Prologic 2. Playstation 2 and Gamecube only. PlayStation 2 does support interior panning, but only supports 24 voices simultaneously. */ }; @@ -646,7 +649,7 @@ enum FSOUND_SPEAKERMODES [DESCRIPTION] Initialization flags. Use them with FSOUND_Init in the flags parameter to change various behaviour. - FSOUND_INIT_ENABLEOUTPUTFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects. + FSOUND_INIT_ENABLESYSTEMCHANNELFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects. Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small. This can be fixed with FSOUND_SetBufferSize. Increase the BufferSize until it works. When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters. @@ -655,16 +658,111 @@ enum FSOUND_SPEAKERMODES FSOUND_Init ] */ -#define FSOUND_INIT_USEDEFAULTMIDISYNTH 0x01 /* Causes MIDI playback to force software decoding. */ -#define FSOUND_INIT_GLOBALFOCUS 0x02 /* For DirectSound output - sound is not muted when window is out of focus. */ -#define FSOUND_INIT_ENABLEOUTPUTFX 0x04 /* For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output! */ -#define FSOUND_INIT_ACCURATEVULEVELS 0x08 /* This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit */ -#define FSOUND_INIT_PS2_DISABLECORE0REVERB 0x10 /* PS2 only - Disable reverb on CORE 0 to regain SRAM */ -#define FSOUND_INIT_PS2_DISABLECORE1REVERB 0x20 /* PS2 only - Disable reverb on CORE 1 to regain SRAM */ -#define FSOUND_INIT_PS2_SWAPDMACORES 0x40 /* PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around */ +#define FSOUND_INIT_USEDEFAULTMIDISYNTH 0x0001 /* Win32 only - Causes MIDI playback to force software decoding. */ +#define FSOUND_INIT_GLOBALFOCUS 0x0002 /* Win32 only - For DirectSound output - sound is not muted when window is out of focus. */ +#define FSOUND_INIT_ENABLESYSTEMCHANNELFX 0x0004 /* Win32 only - For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output! (use FSOUND_SYSTEMCHANNEL as channel id) */ +#define FSOUND_INIT_ACCURATEVULEVELS 0x0008 /* This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit */ +#define FSOUND_INIT_PS2_DISABLECORE0REVERB 0x0010 /* PS2 only - Disable reverb on CORE 0 (SPU2 voices 00-23) to regain SRAM */ +#define FSOUND_INIT_PS2_DISABLECORE1REVERB 0x0020 /* PS2 only - Disable reverb on CORE 1 (SPU2 voices 24-47) to regain SRAM */ +#define FSOUND_INIT_PS2_SWAPDMACORES 0x0040 /* PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around */ +#define FSOUND_INIT_DONTLATENCYADJUST 0x0080 /* Callbacks are not latency adjusted, and are called at mix time. Also information functions are immediate */ +#define FSOUND_INIT_GC_INITLIBS 0x0100 /* GC only - Initializes GC audio libraries */ +#define FSOUND_INIT_STREAM_FROM_MAIN_THREAD 0x0200 /* Turns off fmod streamer thread, and makes streaming update from FSOUND_Update called by the user */ +#define FSOUND_INIT_PS2_USEVOLUMERAMPING 0x0400 /* PS2 only - Turns on volume ramping system to remove hardware clicks. */ +#define FSOUND_INIT_DSOUND_DEFERRED 0x0800 /* Win32 only - For DirectSound output. 3D commands are batched together and executed at FSOUND_Update. */ +#define FSOUND_INIT_DSOUND_HRTF_LIGHT 0x1000 /* Win32 only - For DirectSound output. FSOUND_HW3D buffers use a slightly higher quality algorithm when 3d hardware acceleration is not present. */ +#define FSOUND_INIT_DSOUND_HRTF_FULL 0x2000 /* Win32 only - For DirectSound output. FSOUND_HW3D buffers use full quality 3d playback when 3d hardware acceleration is not present. */ +#define FSOUND_INIT_XBOX_REMOVEHEADROOM 0x4000 /* XBox only - By default directsound attenuates all sound by 6db to avoid clipping/distortion. CAUTION. If you use this flag you are responsible for the final mix to make sure clipping / distortion doesn't happen. */ +#define FSOUND_INIT_PSP_SILENCEONUNDERRUN 0x8000 /* PSP only - If streams skip / stutter when device is powered on, either increase stream buffersize, or use this flag instead to play silence while the UMD is recovering. */ /* [DEFINE_END] */ +/* +[ENUM] +[ + [DESCRIPTION] + Status values for internet streams. Use FSOUND_Stream_Net_GetStatus to get the current status of an internet stream. + + [SEE_ALSO] + FSOUND_Stream_Net_GetStatus +] +*/ +enum FSOUND_STREAM_NET_STATUS +{ + FSOUND_STREAM_NET_NOTCONNECTED = 0, /* Stream hasn't connected yet */ + FSOUND_STREAM_NET_CONNECTING, /* Stream is connecting to remote host */ + FSOUND_STREAM_NET_BUFFERING, /* Stream is buffering data */ + FSOUND_STREAM_NET_READY, /* Stream is ready to play */ + FSOUND_STREAM_NET_ERROR /* Stream has suffered a fatal error */ +}; + + +/* +[ENUM] +[ + [DESCRIPTION] + Describes the type of a particular tag field. + + [SEE_ALSO] + FSOUND_Stream_GetNumTagFields + FSOUND_Stream_GetTagField + FSOUND_Stream_FindTagField +] +*/ +enum FSOUND_TAGFIELD_TYPE +{ + FSOUND_TAGFIELD_VORBISCOMMENT = 0, /* A vorbis comment */ + FSOUND_TAGFIELD_ID3V1, /* Part of an ID3v1 tag */ + FSOUND_TAGFIELD_ID3V2, /* An ID3v2 frame */ + FSOUND_TAGFIELD_SHOUTCAST, /* A SHOUTcast header line */ + FSOUND_TAGFIELD_ICECAST, /* An Icecast header line */ + FSOUND_TAGFIELD_ASF /* An Advanced Streaming Format header line */ +}; + + +/* +[DEFINE_START] +[ + [NAME] + FSOUND_STATUS_FLAGS + + [DESCRIPTION] + These values describe the protocol and format of an internet stream. Use FSOUND_Stream_Net_GetStatus to retrieve this information for an open internet stream. + + [SEE_ALSO] + FSOUND_Stream_Net_GetStatus +] +*/ +#define FSOUND_PROTOCOL_SHOUTCAST 0x00000001 +#define FSOUND_PROTOCOL_ICECAST 0x00000002 +#define FSOUND_PROTOCOL_HTTP 0x00000004 +#define FSOUND_FORMAT_MPEG 0x00010000 +#define FSOUND_FORMAT_OGGVORBIS 0x00020000 +/* [DEFINE_END] */ + + +/* +[STRUCTURE] +[ + [DESCRIPTION] + Structure defining a CD table of contents. This structure is returned as a tag from FSOUND_Stream_FindTagField when the tag name "CD_TOC" is specified. + Note: All tracks on the CD - including data tracks- will be represented in this structure so it's use for anything other than generating disc id information is not recommended. + See the cdda example program for info on retrieving and using this structure. + + [SEE_ALSO] + FSOUND_Stream_Open + FSOUND_Stream_FindTagField +] +*/ +typedef struct _FSOUND_TOC_TAG +{ + char name[4]; /* The string "TOC", just in case this structure is accidentally treated as a string */ + int numtracks; /* The number of tracks on the CD */ + int min[100]; /* The start offset of each track in minutes */ + int sec[100]; /* The start offset of each track in seconds */ + int frame[100]; /* The start offset of each track in frames */ + +} FSOUND_TOC_TAG; /* ========================================================================================== */ @@ -733,13 +831,14 @@ DLL_API void * F_API FSOUND_GetOutputHandle(); DLL_API int F_API FSOUND_GetDriver(); DLL_API int F_API FSOUND_GetMixer(); DLL_API int F_API FSOUND_GetNumDrivers(); -DLL_API signed char * F_API FSOUND_GetDriverName(int id); +DLL_API const char * F_API FSOUND_GetDriverName(int id); DLL_API signed char F_API FSOUND_GetDriverCaps(int id, unsigned int *caps); DLL_API int F_API FSOUND_GetOutputRate(); DLL_API int F_API FSOUND_GetMaxChannels(); DLL_API int F_API FSOUND_GetMaxSamples(); +DLL_API unsigned int F_API FSOUND_GetSpeakerMode(); DLL_API int F_API FSOUND_GetSFXMasterVolume(); -DLL_API int F_API FSOUND_GetNumHardwareChannels(); +DLL_API signed char F_API FSOUND_GetNumHWChannels(int *num2d, int *num3d, int *total); DLL_API int F_API FSOUND_GetChannelsPlaying(); DLL_API float F_API FSOUND_GetCPUUsage(); DLL_API void F_API FSOUND_GetMemoryStats(unsigned int *currentalloced, unsigned int *maxalloced); @@ -754,7 +853,7 @@ DLL_API void F_API FSOUND_GetMemoryStats(unsigned int *currentalloced Use FSOUND_LOADRAW flag with FSOUND_Sample_Load to treat as as raw pcm data. */ -DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int memlength); +DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length); DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Alloc(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri); DLL_API void F_API FSOUND_Sample_Free(FSOUND_SAMPLE *sptr); DLL_API signed char F_API FSOUND_Sample_Upload(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode); @@ -768,6 +867,7 @@ DLL_API signed char F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *pt DLL_API signed char F_API FSOUND_Sample_SetMode(FSOUND_SAMPLE *sptr, unsigned int mode); DLL_API signed char F_API FSOUND_Sample_SetLoopPoints(FSOUND_SAMPLE *sptr, int loopstart, int loopend); DLL_API signed char F_API FSOUND_Sample_SetDefaults(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri); +DLL_API signed char F_API FSOUND_Sample_SetDefaultsEx(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri, int varfreq, int varvol, int varpan); DLL_API signed char F_API FSOUND_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max); DLL_API signed char F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr, int max); @@ -776,11 +876,13 @@ DLL_API signed char F_API FSOUND_Sample_SetMaxPlaybacks(FSOUND_SAMPLE *sptr, */ DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno); -DLL_API char * F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr); +DLL_API const char * F_API FSOUND_Sample_GetName(FSOUND_SAMPLE *sptr); DLL_API unsigned int F_API FSOUND_Sample_GetLength(FSOUND_SAMPLE *sptr); DLL_API signed char F_API FSOUND_Sample_GetLoopPoints(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend); DLL_API signed char F_API FSOUND_Sample_GetDefaults(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri); +DLL_API signed char F_API FSOUND_Sample_GetDefaultsEx(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri, int *varfreq, int *varvol, int *varpan); DLL_API unsigned int F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr); +DLL_API signed char F_API FSOUND_Sample_GetMinMaxDistance(FSOUND_SAMPLE *sptr, float *min, float *max); /* ============================ */ /* Channel control functions. */ @@ -812,6 +914,8 @@ DLL_API signed char F_API FSOUND_SetReserved(int channel, signed char reserv DLL_API signed char F_API FSOUND_SetPaused(int channel, signed char paused); DLL_API signed char F_API FSOUND_SetLoopMode(int channel, unsigned int loopmode); DLL_API signed char F_API FSOUND_SetCurrentPosition(int channel, unsigned int offset); +DLL_API signed char F_API FSOUND_3D_SetAttributes(int channel, const float *pos, const float *vel); +DLL_API signed char F_API FSOUND_3D_SetMinMaxDistance(int channel, float min, float max); /* Channel information functions. @@ -820,6 +924,7 @@ DLL_API signed char F_API FSOUND_SetCurrentPosition(int channel, unsigned in DLL_API signed char F_API FSOUND_IsPlaying(int channel); DLL_API int F_API FSOUND_GetFrequency(int channel); DLL_API int F_API FSOUND_GetVolume(int channel); +DLL_API int F_API FSOUND_GetAmplitude(int channel); DLL_API int F_API FSOUND_GetPan(int channel); DLL_API signed char F_API FSOUND_GetSurround(int channel); DLL_API signed char F_API FSOUND_GetMute(int channel); @@ -830,7 +935,26 @@ DLL_API unsigned int F_API FSOUND_GetLoopMode(int channel); DLL_API unsigned int F_API FSOUND_GetCurrentPosition(int channel); DLL_API FSOUND_SAMPLE * F_API FSOUND_GetCurrentSample(int channel); DLL_API signed char F_API FSOUND_GetCurrentLevels(int channel, float *l, float *r); +DLL_API int F_API FSOUND_GetNumSubChannels(int channel); +DLL_API int F_API FSOUND_GetSubChannel(int channel, int subchannel); +DLL_API signed char F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel); +DLL_API signed char F_API FSOUND_3D_GetMinMaxDistance(int channel, float *min, float *max); +/* ========================== */ +/* Global 3D sound functions. */ +/* ========================== */ + +/* + See also 3d sample and channel based functions above. + Call FSOUND_Update once a frame to process 3d information. +*/ + +DLL_API void F_API FSOUND_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz); +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); +DLL_API void F_API FSOUND_3D_Listener_SetCurrent(int current, int numlisteners); /* use this if you use multiple listeners / splitscreen */ +DLL_API void F_API FSOUND_3D_SetDopplerFactor(float scale); +DLL_API void F_API FSOUND_3D_SetDistanceFactor(float scale); +DLL_API void F_API FSOUND_3D_SetRolloffFactor(float scale); /* =================== */ /* FX functions. */ @@ -841,7 +965,7 @@ DLL_API signed char F_API FSOUND_GetCurrentLevels(int channel, float *l, flo - FX enabled samples can only be played once at a time, not multiple times at once. - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work. - - FSOUND_INIT_ENABLEOUTPUTFX can be used to apply hardware effect processing to the + - FSOUND_INIT_ENABLESYSTEMCHANNELFX can be used to apply hardware effect processing to the global mixed output of FMOD's software channels. - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters. - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type, @@ -850,8 +974,8 @@ DLL_API signed char F_API FSOUND_GetCurrentLevels(int channel, float *l, flo - FSOUND_FX_Disable must be called to reset/clear the FX from a channel. */ -DLL_API int F_API FSOUND_FX_Enable(int channel, unsigned int fx); /* See FSOUND_FX_MODES */ -DLL_API signed char F_API FSOUND_FX_Disable(int channel); +DLL_API int F_API FSOUND_FX_Enable(int channel, unsigned int fxtype); /* See FSOUND_FX_MODES */ +DLL_API signed char F_API FSOUND_FX_Disable(int channel); /* Disables all effects */ 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); DLL_API signed char F_API FSOUND_FX_SetCompressor(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay); @@ -863,66 +987,70 @@ DLL_API signed char F_API FSOUND_FX_SetI3DL2Reverb(int fxid, int Room, int R DLL_API signed char F_API FSOUND_FX_SetParamEQ(int fxid, float Center, float Bandwidth, float Gain); DLL_API signed char F_API FSOUND_FX_SetWavesReverb(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio); -/* =================== */ -/* 3D sound functions. */ -/* =================== */ - -/* - See also FSOUND_Sample_SetMinMaxDistance (above) - Note! FSOUND_3D_Update is now called FSOUND_Update. -*/ - -DLL_API void F_API FSOUND_3D_SetDopplerFactor(float scale); -DLL_API void F_API FSOUND_3D_SetDistanceFactor(float scale); -DLL_API void F_API FSOUND_3D_SetRolloffFactor(float scale); -DLL_API signed char F_API FSOUND_3D_SetAttributes(int channel, float *pos, float *vel); -DLL_API signed char F_API FSOUND_3D_GetAttributes(int channel, float *pos, float *vel); - -DLL_API void F_API FSOUND_3D_Listener_SetCurrent(int current, int numlisteners); /* use this if you use multiple listeners / splitscreen */ -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); -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); - /* ========================= */ /* File Streaming functions. */ /* ========================= */ /* - Note : Use FSOUND_LOADMEMORY flag with FSOUND_Stream_OpenFile to stream from memory. - Use FSOUND_LOADRAW flag with FSOUND_Stream_OpenFile to treat stream as raw pcm data. - Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_OpenFile to open mpegs in 'accurate mode' for settime/gettime/getlengthms. + Note : Use FSOUND_LOADMEMORY flag with FSOUND_Stream_Open to stream from memory. + Use FSOUND_LOADRAW flag with FSOUND_Stream_Open to treat stream as raw pcm data. + Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_Open to open mpegs in 'accurate mode' for settime/gettime/getlengthms. Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you. */ -DLL_API signed char F_API FSOUND_Stream_SetBufferSize(int ms); /* call this before opening streams, not after */ - -DLL_API FSOUND_STREAM * F_API FSOUND_Stream_OpenFile(const char *filename, unsigned int mode, int memlength); -DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, int userdata); -DLL_API signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream); +DLL_API signed char F_API FSOUND_Stream_SetBufferSize(int ms); /* call this before opening streams, not after */ + +DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length); +DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, void *userdata); +DLL_API signed char F_API FSOUND_Stream_Close(FSOUND_STREAM *stream); + +DLL_API int F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream); +DLL_API int F_API FSOUND_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused); +DLL_API signed char F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream); + +DLL_API signed char F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, unsigned int position); +DLL_API unsigned int F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream); +DLL_API signed char F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms); +DLL_API int F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream); +DLL_API int F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream); +DLL_API int F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream); + +DLL_API signed char F_API FSOUND_Stream_SetMode(FSOUND_STREAM *stream, unsigned int mode); +DLL_API unsigned int F_API FSOUND_Stream_GetMode(FSOUND_STREAM *stream); +DLL_API signed char F_API FSOUND_Stream_SetLoopPoints(FSOUND_STREAM *stream, unsigned int loopstartpcm, unsigned int loopendpcm); +DLL_API signed char F_API FSOUND_Stream_SetLoopCount(FSOUND_STREAM *stream, int count); +DLL_API int F_API FSOUND_Stream_GetOpenState(FSOUND_STREAM *stream); /* use with FSOUND_NONBLOCKING opened streams */ +DLL_API FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream); +DLL_API FSOUND_DSPUNIT * F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, void *userdata); + +DLL_API signed char F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata); +DLL_API signed char F_API FSOUND_Stream_SetSyncCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata); + +DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_AddSyncPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, const char *name); +DLL_API signed char F_API FSOUND_Stream_DeleteSyncPoint(FSOUND_SYNCPOINT *point); +DLL_API int F_API FSOUND_Stream_GetNumSyncPoints(FSOUND_STREAM *stream); +DLL_API FSOUND_SYNCPOINT * F_API FSOUND_Stream_GetSyncPoint(FSOUND_STREAM *stream, int index); +DLL_API char * F_API FSOUND_Stream_GetSyncPointInfo(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset); + +DLL_API signed char F_API FSOUND_Stream_SetSubStream(FSOUND_STREAM *stream, int index); /* For FMOD .FSB bank files. */ +DLL_API int F_API FSOUND_Stream_GetNumSubStreams(FSOUND_STREAM *stream); /* For FMOD .FSB bank files. */ +DLL_API signed char F_API FSOUND_Stream_SetSubStreamSentence(FSOUND_STREAM *stream, const int *sentencelist, int numitems); + +DLL_API signed char F_API FSOUND_Stream_GetNumTagFields(FSOUND_STREAM *stream, int *num); +DLL_API signed char F_API FSOUND_Stream_GetTagField(FSOUND_STREAM *stream, int num, int *type, char **name, void **value, int *length); +DLL_API signed char F_API FSOUND_Stream_FindTagField(FSOUND_STREAM *stream, int type, const char *name, void **value, int *length); -DLL_API int F_API FSOUND_Stream_Play(int channel, FSOUND_STREAM *stream); -DLL_API int F_API FSOUND_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused); -DLL_API signed char F_API FSOUND_Stream_Stop(FSOUND_STREAM *stream); - -DLL_API int F_API FSOUND_Stream_GetOpenState(FSOUND_STREAM *stream); /* use with FSOUND_NONBLOCKING opened streams */ -DLL_API signed char F_API FSOUND_Stream_SetPosition(FSOUND_STREAM *stream, unsigned int position); -DLL_API unsigned int F_API FSOUND_Stream_GetPosition(FSOUND_STREAM *stream); -DLL_API signed char F_API FSOUND_Stream_SetTime(FSOUND_STREAM *stream, int ms); -DLL_API int F_API FSOUND_Stream_GetTime(FSOUND_STREAM *stream); -DLL_API int F_API FSOUND_Stream_GetLength(FSOUND_STREAM *stream); -DLL_API int F_API FSOUND_Stream_GetLengthMs(FSOUND_STREAM *stream); - -DLL_API signed char F_API FSOUND_Stream_SetLoopPoints(FSOUND_STREAM *stream, unsigned int loopstartpcm, unsigned int loopendpcm); -DLL_API FSOUND_SAMPLE * F_API FSOUND_Stream_GetSample(FSOUND_STREAM *stream); -DLL_API FSOUND_DSPUNIT *F_API FSOUND_Stream_CreateDSP(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, int param); -DLL_API signed char F_API FSOUND_Stream_SetEndCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata); - -DLL_API signed char F_API FSOUND_Stream_SetSynchCallback(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata); -DLL_API int F_API FSOUND_Stream_AddSynchPoint(FSOUND_STREAM *stream, unsigned int pcmoffset, int userdata); -DLL_API signed char F_API FSOUND_Stream_DeleteSynchPoint(FSOUND_STREAM *stream, int index); -DLL_API int F_API FSOUND_Stream_GetNumSynchPoints(FSOUND_STREAM *stream); +/* + Internet streaming functions +*/ -DLL_API signed char F_API FSOUND_Stream_SetSubStream(FSOUND_STREAM *stream, int index); /* For FMOD .FSB bank files. Console only currently. */ -DLL_API int F_API FSOUND_Stream_GetNumSubStreams(FSOUND_STREAM *stream); /* For FMOD .FSB bank files. Console only currently. */ +DLL_API signed char F_API FSOUND_Stream_Net_SetProxy(const char *proxy); +DLL_API signed char F_API FSOUND_Stream_Net_SetTimeout(int timeout); +DLL_API char * F_API FSOUND_Stream_Net_GetLastServerStatus(); +DLL_API signed char F_API FSOUND_Stream_Net_SetBufferProperties(int buffersize, int prebuffer_percent, int rebuffer_percent); +DLL_API signed char F_API FSOUND_Stream_Net_GetBufferProperties(int *buffersize, int *prebuffer_percent, int *rebuffer_percent); +DLL_API signed char F_API FSOUND_Stream_Net_SetMetadataCallback(FSOUND_STREAM *stream, FSOUND_METADATACALLBACK callback, void *userdata); +DLL_API signed char F_API FSOUND_Stream_Net_GetStatus(FSOUND_STREAM *stream, int *status, int *bufferpercentused, int *bitrate, unsigned int *flags); /* =================== */ /* CD audio functions. */ @@ -937,7 +1065,8 @@ DLL_API void F_API FSOUND_CD_SetPlayMode(char drive, signed char mode DLL_API signed char F_API FSOUND_CD_Stop(char drive); DLL_API signed char F_API FSOUND_CD_SetPaused(char drive, signed char paused); DLL_API signed char F_API FSOUND_CD_SetVolume(char drive, int volume); -DLL_API signed char F_API FSOUND_CD_Eject(char drive); +DLL_API signed char F_API FSOUND_CD_SetTrackTime(char drive, unsigned int ms); +DLL_API signed char F_API FSOUND_CD_OpenTray(char drive, signed char open); DLL_API signed char F_API FSOUND_CD_GetPaused(char drive); DLL_API int F_API FSOUND_CD_GetTrack(char drive); @@ -955,7 +1084,7 @@ DLL_API int F_API FSOUND_CD_GetTrackTime(char drive); These functions allow you access to the mixed stream that FMOD uses to play back sound on. */ -DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, int param); +DLL_API FSOUND_DSPUNIT *F_API FSOUND_DSP_Create(FSOUND_DSPCALLBACK callback, int priority, void *userdata); DLL_API void F_API FSOUND_DSP_Free(FSOUND_DSPUNIT *unit); DLL_API void F_API FSOUND_DSP_SetPriority(FSOUND_DSPUNIT *unit, int priority); DLL_API int F_API FSOUND_DSP_GetPriority(FSOUND_DSPUNIT *unit); @@ -993,10 +1122,10 @@ DLL_API float * F_API FSOUND_DSP_GetSpectrum(); /* Array of 512 See top of file for definitions and information on the reverb parameters. */ -DLL_API signed char F_API FSOUND_Reverb_SetProperties(FSOUND_REVERB_PROPERTIES *prop); -DLL_API signed char F_API FSOUND_Reverb_GetProperties(FSOUND_REVERB_PROPERTIES *prop); -DLL_API signed char F_API FSOUND_Reverb_SetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop); -DLL_API signed char F_API FSOUND_Reverb_GetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop); +DLL_API signed char F_API FSOUND_Reverb_SetProperties(const FSOUND_REVERB_PROPERTIES *prop); +DLL_API signed char F_API FSOUND_Reverb_GetProperties(FSOUND_REVERB_PROPERTIES *prop); +DLL_API signed char F_API FSOUND_Reverb_SetChannelProperties(int channel, const FSOUND_REVERB_CHANNELPROPERTIES *prop); +DLL_API signed char F_API FSOUND_Reverb_GetChannelProperties(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop); /* ===================================================== */ /* Recording functions (ONLY SUPPORTED IN WIN32, WINCE) */ @@ -1008,7 +1137,7 @@ DLL_API signed char F_API FSOUND_Reverb_GetChannelProperties(int channel, FSOUND DLL_API signed char F_API FSOUND_Record_SetDriver(int outputtype); DLL_API int F_API FSOUND_Record_GetNumDrivers(); -DLL_API signed char * F_API FSOUND_Record_GetDriverName(int id); +DLL_API const char * F_API FSOUND_Record_GetDriverName(int id); DLL_API int F_API FSOUND_Record_GetDriver(); /* @@ -1028,7 +1157,8 @@ DLL_API int F_API FSOUND_Record_GetPosition(); */ DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSong(const char *name); -DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongMemory(void *data, int length); +DLL_API FMUSIC_MODULE * F_API FMUSIC_LoadSongEx(const char *name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum); +DLL_API int F_API FMUSIC_GetOpenState(FMUSIC_MODULE *mod); DLL_API signed char F_API FMUSIC_FreeSong(FMUSIC_MODULE *mod); DLL_API signed char F_API FMUSIC_PlaySong(FMUSIC_MODULE *mod); DLL_API signed char F_API FMUSIC_StopSong(FMUSIC_MODULE *mod); @@ -1040,7 +1170,7 @@ DLL_API signed char F_API FMUSIC_SetOrderCallback(FMUSIC_MODULE *mod, FMUSIC DLL_API signed char F_API FMUSIC_SetInstCallback(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument); DLL_API signed char F_API FMUSIC_SetSample(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr); -DLL_API signed char F_API FMUSIC_SetUserData(FMUSIC_MODULE *mod, unsigned int userdata); +DLL_API signed char F_API FMUSIC_SetUserData(FMUSIC_MODULE *mod, void *userdata); DLL_API signed char F_API FMUSIC_OptimizeChannels(FMUSIC_MODULE *mod, int maxchannels, int minvolume); /* @@ -1059,7 +1189,7 @@ DLL_API signed char F_API FMUSIC_SetPanSeperation(FMUSIC_MODULE *mod, float Static song information functions. */ -DLL_API char * F_API FMUSIC_GetName(FMUSIC_MODULE *mod); +DLL_API const char * F_API FMUSIC_GetName(FMUSIC_MODULE *mod); DLL_API int F_API FMUSIC_GetType(FMUSIC_MODULE *mod); DLL_API int F_API FMUSIC_GetNumOrders(FMUSIC_MODULE *mod); DLL_API int F_API FMUSIC_GetNumPatterns(FMUSIC_MODULE *mod); @@ -1085,7 +1215,7 @@ DLL_API int F_API FMUSIC_GetRow(FMUSIC_MODULE *mod); DLL_API signed char F_API FMUSIC_GetPaused(FMUSIC_MODULE *mod); DLL_API int F_API FMUSIC_GetTime(FMUSIC_MODULE *mod); DLL_API int F_API FMUSIC_GetRealChannel(FMUSIC_MODULE *mod, int modchannel); -DLL_API unsigned int F_API FMUSIC_GetUserData(FMUSIC_MODULE *mod); +DLL_API void * F_API FMUSIC_GetUserData(FMUSIC_MODULE *mod); #ifdef __cplusplus } diff --git a/Toshi/vendor/fmod/include/fmod_errors.h b/Toshi/vendor/fmod/include/fmod_errors.h index 31b13da..9004ec1 100644 --- a/Toshi/vendor/fmod/include/fmod_errors.h +++ b/Toshi/vendor/fmod/include/fmod_errors.h @@ -7,7 +7,7 @@ static char *FMOD_ErrorString(int errcode) { case FMOD_ERR_NONE: return "No errors"; case FMOD_ERR_BUSY: return "Cannot call this command after FSOUND_Init. Call FSOUND_Close first."; - case FMOD_ERR_UNINITIALIZED: return "This command failed because FSOUND_Init was not called or called properly"; + case FMOD_ERR_UNINITIALIZED: return "This command failed because FSOUND_Init was not called"; case FMOD_ERR_PLAY: return "Playing the sound failed."; case FMOD_ERR_INIT: return "Error initializing output device."; case FMOD_ERR_ALLOCATED: return "The output device is already in use and cannot be reused."; @@ -27,6 +27,6 @@ static char *FMOD_ErrorString(int errcode) default : return "Unknown error"; }; -}; +} #endif diff --git a/Toshi/vendor/fmod/include/fmoddyn.h b/Toshi/vendor/fmod/include/fmoddyn.h index f4a8601..d1e1d42 100644 --- a/Toshi/vendor/fmod/include/fmoddyn.h +++ b/Toshi/vendor/fmod/include/fmoddyn.h @@ -1,463 +1,546 @@ -/* ========================================================================================== */ -/* FMOD Dynamic DLL loading header. Copyright (c), Firelight Technologies Pty, Ltd 1999-2002. */ -/* ========================================================================================== */ +/* =========================================================================================== */ +/* FMOD Dynamic DLL loading header. Copyright (c), Firelight Technologies Pty, Ltd. 1999-2004. */ +/* =========================================================================================== */ #ifndef _FMODDYN_H_ #define _FMODDYN_H_ -#include -#include +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) + #include +#else + #include + #include +#endif +#include + #include "fmod.h" typedef struct { - HMODULE module; + void *module; - signed char (F_API *FSOUND_SetOutput)(int outputtype); - signed char (F_API *FSOUND_SetDriver)(int driver); - signed char (F_API *FSOUND_SetMixer)(int mixer); - signed char (F_API *FSOUND_SetBufferSize)(int len_ms); - signed char (F_API *FSOUND_SetHWND)(void *hwnd); - signed char (F_API *FSOUND_SetMinHardwareChannels)(int min); - signed char (F_API *FSOUND_SetMaxHardwareChannels)(int max); - signed char (F_API *FSOUND_SetMemorySystem)(void *pool, int poollen, FSOUND_ALLOCCALLBACK useralloc, FSOUND_REALLOCCALLBACK userrealloc, FSOUND_FREECALLBACK userfree); - signed char (F_API *FSOUND_Init)(int mixrate, int maxsoftwarechannels, unsigned int flags); - void (F_API *FSOUND_Close)(); - void (F_API *FSOUND_SetSpeakerMode)(unsigned int speakermode); - void (F_API *FSOUND_SetSFXMasterVolume)(int volume); - void (F_API *FSOUND_SetPanSeperation)(float pansep); - void (F_API *FSOUND_File_SetCallbacks)(FSOUND_OPENCALLBACK useropen, FSOUND_CLOSECALLBACK userclose, FSOUND_READCALLBACK userread, FSOUND_SEEKCALLBACK userseek, FSOUND_TELLCALLBACK usertell); - int (F_API *FSOUND_GetError)(); - float (F_API *FSOUND_GetVersion)(); - int (F_API *FSOUND_GetOutput)(); - void * (F_API *FSOUND_GetOutputHandle)(); - int (F_API *FSOUND_GetDriver)(); - int (F_API *FSOUND_GetMixer)(); - int (F_API *FSOUND_GetNumDrivers)(); - signed char * (F_API *FSOUND_GetDriverName)(int id); - signed char (F_API *FSOUND_GetDriverCaps)(int id, unsigned int *caps); - int (F_API *FSOUND_GetOutputRate)(); - int (F_API *FSOUND_GetMaxChannels)(); - int (F_API *FSOUND_GetMaxSamples)(); - int (F_API *FSOUND_GetSFXMasterVolume)(); - int (F_API *FSOUND_GetNumHardwareChannels)(); - int (F_API *FSOUND_GetChannelsPlaying)(); - float (F_API *FSOUND_GetCPUUsage)(); - void (F_API *FSOUND_GetMemoryStats)(unsigned int *currentalloced, unsigned int *maxalloced); - FSOUND_SAMPLE * (F_API *FSOUND_Sample_Load)(int index, const char *name_or_data, unsigned int mode, int memlength); - FSOUND_SAMPLE * (F_API *FSOUND_Sample_Alloc)(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri); - void (F_API *FSOUND_Sample_Free)(FSOUND_SAMPLE *sptr); - signed char (F_API *FSOUND_Sample_Upload)(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode); - signed char (F_API *FSOUND_Sample_Lock)(FSOUND_SAMPLE *sptr, int offset, int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2); - signed char (F_API *FSOUND_Sample_Unlock)(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2); - signed char (F_API *FSOUND_Sample_SetMode)(FSOUND_SAMPLE *sptr, unsigned int mode); - signed char (F_API *FSOUND_Sample_SetLoopPoints)(FSOUND_SAMPLE *sptr, int loopstart, int loopend); - signed char (F_API *FSOUND_Sample_SetDefaults)(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri); - signed char (F_API *FSOUND_Sample_SetMinMaxDistance)(FSOUND_SAMPLE *sptr, float min, float max); - signed char (F_API *FSOUND_Sample_SetMaxPlaybacks)(FSOUND_SAMPLE *sptr, int max); - FSOUND_SAMPLE * (F_API *FSOUND_Sample_Get)(int sampno); - char * (F_API *FSOUND_Sample_GetName)(FSOUND_SAMPLE *sptr); - unsigned int (F_API *FSOUND_Sample_GetLength)(FSOUND_SAMPLE *sptr); - signed char (F_API *FSOUND_Sample_GetLoopPoints)(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend); - signed char (F_API *FSOUND_Sample_GetDefaults)(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri); - unsigned int (F_API *FSOUND_Sample_GetMode)(FSOUND_SAMPLE *sptr); - int (F_API *FSOUND_PlaySound)(int channel, FSOUND_SAMPLE *sptr); - int (F_API *FSOUND_PlaySoundEx)(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); - signed char (F_API *FSOUND_StopSound)(int channel); - signed char (F_API *FSOUND_SetFrequency)(int channel, int freq); - signed char (F_API *FSOUND_SetVolume)(int channel, int vol); - signed char (F_API *FSOUND_SetVolumeAbsolute)(int channel, int vol); - signed char (F_API *FSOUND_SetPan)(int channel, int pan); - signed char (F_API *FSOUND_SetSurround)(int channel, signed char surround); - signed char (F_API *FSOUND_SetMute)(int channel, signed char mute); - signed char (F_API *FSOUND_SetPriority)(int channel, int priority); - signed char (F_API *FSOUND_SetReserved)(int channel, signed char reserved); - signed char (F_API *FSOUND_SetPaused)(int channel, signed char paused); - signed char (F_API *FSOUND_SetLoopMode)(int channel, unsigned int loopmode); - signed char (F_API *FSOUND_SetCurrentPosition)(int channel, unsigned int offset); - signed char (F_API *FSOUND_IsPlaying)(int channel); - int (F_API *FSOUND_GetFrequency)(int channel); - int (F_API *FSOUND_GetVolume)(int channel); - int (F_API *FSOUND_GetPan)(int channel); - signed char (F_API *FSOUND_GetSurround)(int channel); - signed char (F_API *FSOUND_GetMute)(int channel); - int (F_API *FSOUND_GetPriority)(int channel); - signed char (F_API *FSOUND_GetReserved)(int channel); - signed char (F_API *FSOUND_GetPaused)(int channel); - unsigned int (F_API *FSOUND_GetLoopMode)(int channel); - unsigned int (F_API *FSOUND_GetCurrentPosition)(int channel); - FSOUND_SAMPLE * (F_API *FSOUND_GetCurrentSample)(int channel); - signed char (F_API *FSOUND_GetCurrentLevels)(int channel, float *l, float *r); - int (F_API *FSOUND_FX_Enable)(int channel, unsigned int fx); /* See FSOUND_FX_MODES */ - signed char (F_API *FSOUND_FX_Disable)(int channel); - signed char (F_API *FSOUND_FX_SetChorus)(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase); - signed char (F_API *FSOUND_FX_SetCompressor)(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay); - signed char (F_API *FSOUND_FX_SetDistortion)(int fxid, float Gain, float Edge, float PostEQCenterFrequency, float PostEQBandwidth, float PreLowpassCutoff); - signed char (F_API *FSOUND_FX_SetEcho)(int fxid, float WetDryMix, float Feedback, float LeftDelay, float RightDelay, int PanDelay); - signed char (F_API *FSOUND_FX_SetFlanger)(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase); - signed char (F_API *FSOUND_FX_SetGargle)(int fxid, int RateHz, int WaveShape); - 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); - signed char (F_API *FSOUND_FX_SetParamEQ)(int fxid, float Center, float Bandwidth, float Gain); - signed char (F_API *FSOUND_FX_SetWavesReverb)(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio); - void (F_API *FSOUND_Update)(); /* you must call this once a frame */ - void (F_API *FSOUND_3D_SetDopplerFactor)(float scale); - void (F_API *FSOUND_3D_SetDistanceFactor)(float scale); - void (F_API *FSOUND_3D_SetRolloffFactor)(float scale); - signed char (F_API *FSOUND_3D_SetAttributes)(int channel, float *pos, float *vel); - signed char (F_API *FSOUND_3D_GetAttributes)(int channel, float *pos, float *vel); - void (F_API *FSOUND_3D_Listener_SetCurrent)(int current, int numlisteners); /* use this if you use multiple listeners / splitscreen */ - void (F_API *FSOUND_3D_Listener_SetAttributes)(float *pos, float *vel, float fx, float fy, float fz, float tx, float ty, float tz); - void (F_API *FSOUND_3D_Listener_GetAttributes)(float *pos, float *vel, float *fx, float *fy, float *fz, float *tx, float *ty, float *tz); - signed char (F_API *FSOUND_Stream_SetBufferSize)(int ms); /* call this before opening streams, not after */ - FSOUND_STREAM * (F_API *FSOUND_Stream_OpenFile)(const char *filename, unsigned int mode, int memlength); - FSOUND_STREAM * (F_API *FSOUND_Stream_Create)(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, int userdata); - int (F_API *FSOUND_Stream_Play)(int channel, FSOUND_STREAM *stream); - int (F_API *FSOUND_Stream_PlayEx)(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused); - signed char (F_API *FSOUND_Stream_Stop)(FSOUND_STREAM *stream); - signed char (F_API *FSOUND_Stream_Close)(FSOUND_STREAM *stream); - signed char (F_API *FSOUND_Stream_SetEndCallback)(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata); - signed char (F_API *FSOUND_Stream_SetSynchCallback)(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, int userdata); - FSOUND_SAMPLE * (F_API *FSOUND_Stream_GetSample)(FSOUND_STREAM *stream); /* every stream contains a sample to playback on */ - FSOUND_DSPUNIT *(F_API *FSOUND_Stream_CreateDSP)(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, int param); - signed char (F_API *FSOUND_Stream_SetPosition)(FSOUND_STREAM *stream, unsigned int position); - unsigned int (F_API *FSOUND_Stream_GetPosition)(FSOUND_STREAM *stream); - signed char (F_API *FSOUND_Stream_SetTime)(FSOUND_STREAM *stream, int ms); - int (F_API *FSOUND_Stream_GetTime)(FSOUND_STREAM *stream); - int (F_API *FSOUND_Stream_GetLength)(FSOUND_STREAM *stream); - int (F_API *FSOUND_Stream_GetLengthMs)(FSOUND_STREAM *stream); - signed char (F_API *FSOUND_Stream_SetSubStream)(FSOUND_STREAM *stream, int index); - int (F_API *FSOUND_Stream_GetNumSubStreams)(FSOUND_STREAM *stream); - signed char (F_API *FSOUND_Stream_SetLoopPoints)(FSOUND_STREAM *stream, unsigned int loopstartpcm, unsigned int loopendpcm); - int (F_API *FSOUND_Stream_AddSynchPoint)(FSOUND_STREAM *stream, unsigned int pcmoffset, int userdata); - signed char (F_API *FSOUND_Stream_DeleteSynchPoint)(FSOUND_STREAM *stream, int index); - int (F_API *FSOUND_Stream_GetNumSynchPoints)(FSOUND_STREAM *stream); - int (F_API *FSOUND_Stream_GetOpenState)(FSOUND_STREAM *stream); - signed char (F_API *FSOUND_CD_Play)(char drive, int track); - void (F_API *FSOUND_CD_SetPlayMode)(char drive, signed char mode); - signed char (F_API *FSOUND_CD_Stop)(char drive); - signed char (F_API *FSOUND_CD_SetPaused)(char drive, signed char paused); - signed char (F_API *FSOUND_CD_SetVolume)(char drive, int volume); - signed char (F_API *FSOUND_CD_Eject)(char drive); - signed char (F_API *FSOUND_CD_GetPaused)(char drive); - int (F_API *FSOUND_CD_GetTrack)(char drive); - int (F_API *FSOUND_CD_GetNumTracks)(char drive); - int (F_API *FSOUND_CD_GetVolume)(char drive); - int (F_API *FSOUND_CD_GetTrackLength)(char drive, int track); - int (F_API *FSOUND_CD_GetTrackTime)(char drive); - FSOUND_DSPUNIT *(F_API *FSOUND_DSP_Create)(FSOUND_DSPCALLBACK callback, int priority, int param); - void (F_API *FSOUND_DSP_Free)(FSOUND_DSPUNIT *unit); - void (F_API *FSOUND_DSP_SetPriority)(FSOUND_DSPUNIT *unit, int priority); - int (F_API *FSOUND_DSP_GetPriority)(FSOUND_DSPUNIT *unit); - void (F_API *FSOUND_DSP_SetActive)(FSOUND_DSPUNIT *unit, signed char active); - signed char (F_API *FSOUND_DSP_GetActive)(FSOUND_DSPUNIT *unit); - FSOUND_DSPUNIT *(F_API *FSOUND_DSP_GetClearUnit)(); - FSOUND_DSPUNIT *(F_API *FSOUND_DSP_GetSFXUnit)(); - FSOUND_DSPUNIT *(F_API *FSOUND_DSP_GetMusicUnit)(); - FSOUND_DSPUNIT *(F_API *FSOUND_DSP_GetFFTUnit)(); - FSOUND_DSPUNIT *(F_API *FSOUND_DSP_GetClipAndCopyUnit)(); - signed char (F_API *FSOUND_DSP_MixBuffers)(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode); - void (F_API *FSOUND_DSP_ClearMixBuffer)(); - int (F_API *FSOUND_DSP_GetBufferLength)(); /* Length of each DSP update */ - int (F_API *FSOUND_DSP_GetBufferLengthTotal)(); /* Total buffer length due to FSOUND_SetBufferSize */ - float * (F_API *FSOUND_DSP_GetSpectrum)(); /* Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. */ - signed char (F_API *FSOUND_Reverb_SetProperties)(FSOUND_REVERB_PROPERTIES *prop); - signed char (F_API *FSOUND_Reverb_GetProperties)(FSOUND_REVERB_PROPERTIES *prop); - signed char (F_API *FSOUND_Reverb_SetChannelProperties)(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop); - signed char (F_API *FSOUND_Reverb_GetChannelProperties)(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop); - signed char (F_API *FSOUND_Record_SetDriver)(int outputtype); - int (F_API *FSOUND_Record_GetNumDrivers)(); - signed char * (F_API *FSOUND_Record_GetDriverName)(int id); - int (F_API *FSOUND_Record_GetDriver)(); - signed char (F_API *FSOUND_Record_StartSample)(FSOUND_SAMPLE *sptr, signed char loop); - signed char (F_API *FSOUND_Record_Stop)(); - int (F_API *FSOUND_Record_GetPosition)(); - FMUSIC_MODULE * (F_API *FMUSIC_LoadSong)(const char *name); - FMUSIC_MODULE * (F_API *FMUSIC_LoadSongMemory)(void *data, int length); - signed char (F_API *FMUSIC_FreeSong)(FMUSIC_MODULE *mod); - signed char (F_API *FMUSIC_PlaySong)(FMUSIC_MODULE *mod); - signed char (F_API *FMUSIC_StopSong)(FMUSIC_MODULE *mod); - void (F_API *FMUSIC_StopAllSongs)(); - signed char (F_API *FMUSIC_SetZxxCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback); - signed char (F_API *FMUSIC_SetRowCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep); - signed char (F_API *FMUSIC_SetOrderCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep); - signed char (F_API *FMUSIC_SetInstCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument); - signed char (F_API *FMUSIC_SetSample)(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr); - signed char (F_API *FMUSIC_SetUserData)(FMUSIC_MODULE *mod, unsigned int userdata); - signed char (F_API *FMUSIC_OptimizeChannels)(FMUSIC_MODULE *mod, int maxchannels, int minvolume); - signed char (F_API *FMUSIC_SetReverb)(signed char reverb); /* MIDI only */ - signed char (F_API *FMUSIC_SetLooping)(FMUSIC_MODULE *mod, signed char looping); - signed char (F_API *FMUSIC_SetOrder)(FMUSIC_MODULE *mod, int order); - signed char (F_API *FMUSIC_SetPaused)(FMUSIC_MODULE *mod, signed char pause); - signed char (F_API *FMUSIC_SetMasterVolume)(FMUSIC_MODULE *mod, int volume); - signed char (F_API *FMUSIC_SetMasterSpeed)(FMUSIC_MODULE *mode, float speed); - signed char (F_API *FMUSIC_SetPanSeperation)(FMUSIC_MODULE *mod, float pansep); - char * (F_API *FMUSIC_GetName)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetType)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetNumOrders)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetNumPatterns)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetNumInstruments)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetNumSamples)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetNumChannels)(FMUSIC_MODULE *mod); - FSOUND_SAMPLE * (F_API *FMUSIC_GetSample)(FMUSIC_MODULE *mod, int sampno); - int (F_API *FMUSIC_GetPatternLength)(FMUSIC_MODULE *mod, int orderno); - signed char (F_API *FMUSIC_IsFinished)(FMUSIC_MODULE *mod); - signed char (F_API *FMUSIC_IsPlaying)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetMasterVolume)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetGlobalVolume)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetOrder)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetPattern)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetSpeed)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetBPM)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetRow)(FMUSIC_MODULE *mod); - signed char (F_API *FMUSIC_GetPaused)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetTime)(FMUSIC_MODULE *mod); - int (F_API *FMUSIC_GetRealChannel)(FMUSIC_MODULE *mod, int modchannel); - unsigned int (F_API *FMUSIC_GetUserData)(FMUSIC_MODULE *mod); + signed char (F_API *FSOUND_SetOutput)(int outputtype); + signed char (F_API *FSOUND_SetDriver)(int driver); + signed char (F_API *FSOUND_SetMixer)(int mixer); + signed char (F_API *FSOUND_SetBufferSize)(int len_ms); + signed char (F_API *FSOUND_SetHWND)(void *hwnd); + signed char (F_API *FSOUND_SetMinHardwareChannels)(int min); + signed char (F_API *FSOUND_SetMaxHardwareChannels)(int max); + signed char (F_API *FSOUND_SetMemorySystem)(void *pool, int poollen, FSOUND_ALLOCCALLBACK useralloc, FSOUND_REALLOCCALLBACK userrealloc, FSOUND_FREECALLBACK userfree); + signed char (F_API *FSOUND_Init)(int mixrate, int maxsoftwarechannels, unsigned int flags); + void (F_API *FSOUND_Close)(); + void (F_API *FSOUND_Update)(); /* you must call this once a frame */ + void (F_API *FSOUND_SetSpeakerMode)(unsigned int speakermode); + void (F_API *FSOUND_SetSFXMasterVolume)(int volume); + void (F_API *FSOUND_SetPanSeperation)(float pansep); + void (F_API *FSOUND_File_SetCallbacks)(FSOUND_OPENCALLBACK useropen, FSOUND_CLOSECALLBACK userclose, FSOUND_READCALLBACK userread, FSOUND_SEEKCALLBACK userseek, FSOUND_TELLCALLBACK usertell); + int (F_API *FSOUND_GetError)(); + float (F_API *FSOUND_GetVersion)(); + int (F_API *FSOUND_GetOutput)(); + void * (F_API *FSOUND_GetOutputHandle)(); + int (F_API *FSOUND_GetDriver)(); + int (F_API *FSOUND_GetMixer)(); + int (F_API *FSOUND_GetNumDrivers)(); + const char * (F_API *FSOUND_GetDriverName)(int id); + signed char (F_API *FSOUND_GetDriverCaps)(int id, unsigned int *caps); + int (F_API *FSOUND_GetOutputRate)(); + int (F_API *FSOUND_GetMaxChannels)(); + int (F_API *FSOUND_GetMaxSamples)(); + unsigned int (F_API *FSOUND_GetSpeakerMode)(); + int (F_API *FSOUND_GetSFXMasterVolume)(); + signed char (F_API *FSOUND_GetNumHWChannels)(int *num2d, int *num3d, int *total); + int (F_API *FSOUND_GetChannelsPlaying)(); + float (F_API *FSOUND_GetCPUUsage)(); + void (F_API *FSOUND_GetMemoryStats)(unsigned int *currentalloced, unsigned int *maxalloced); + FSOUND_SAMPLE * (F_API *FSOUND_Sample_Load)(int index, const char *name_or_data, unsigned int mode, int offset, int length); + FSOUND_SAMPLE * (F_API *FSOUND_Sample_Alloc)(int index, int length, unsigned int mode, int deffreq, int defvol, int defpan, int defpri); + void (F_API *FSOUND_Sample_Free)(FSOUND_SAMPLE *sptr); + signed char (F_API *FSOUND_Sample_Upload)(FSOUND_SAMPLE *sptr, void *srcdata, unsigned int mode); + signed char (F_API *FSOUND_Sample_Lock)(FSOUND_SAMPLE *sptr, int offset, int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2); + signed char (F_API *FSOUND_Sample_Unlock)(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2); + signed char (F_API *FSOUND_Sample_SetMode)(FSOUND_SAMPLE *sptr, unsigned int mode); + signed char (F_API *FSOUND_Sample_SetLoopPoints)(FSOUND_SAMPLE *sptr, int loopstart, int loopend); + signed char (F_API *FSOUND_Sample_SetDefaults)(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri); + signed char (F_API *FSOUND_Sample_SetDefaultsEx)(FSOUND_SAMPLE *sptr, int deffreq, int defvol, int defpan, int defpri, int varfreq, int varvol, int varpan); + signed char (F_API *FSOUND_Sample_SetMinMaxDistance)(FSOUND_SAMPLE *sptr, float min, float max); + signed char (F_API *FSOUND_Sample_SetMaxPlaybacks)(FSOUND_SAMPLE *sptr, int max); + FSOUND_SAMPLE * (F_API *FSOUND_Sample_Get)(int sampno); + const char * (F_API *FSOUND_Sample_GetName)(FSOUND_SAMPLE *sptr); + unsigned int (F_API *FSOUND_Sample_GetLength)(FSOUND_SAMPLE *sptr); + signed char (F_API *FSOUND_Sample_GetLoopPoints)(FSOUND_SAMPLE *sptr, int *loopstart, int *loopend); + signed char (F_API *FSOUND_Sample_GetDefaults)(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri); + signed char (F_API *FSOUND_Sample_GetDefaultsEx)(FSOUND_SAMPLE *sptr, int *deffreq, int *defvol, int *defpan, int *defpri, int *varfreq, int *varvol, int *varpan); + unsigned int (F_API *FSOUND_Sample_GetMode)(FSOUND_SAMPLE *sptr); + signed char (F_API *FSOUND_Sample_GetMinMaxDistance)(FSOUND_SAMPLE *sptr, float *min, float *max); + int (F_API *FSOUND_PlaySound)(int channel, FSOUND_SAMPLE *sptr); + int (F_API *FSOUND_PlaySoundEx)(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); + signed char (F_API *FSOUND_StopSound)(int channel); + signed char (F_API *FSOUND_SetFrequency)(int channel, int freq); + signed char (F_API *FSOUND_SetVolume)(int channel, int vol); + signed char (F_API *FSOUND_SetVolumeAbsolute)(int channel, int vol); + signed char (F_API *FSOUND_SetPan)(int channel, int pan); + signed char (F_API *FSOUND_SetSurround)(int channel, signed char surround); + signed char (F_API *FSOUND_SetMute)(int channel, signed char mute); + signed char (F_API *FSOUND_SetPriority)(int channel, int priority); + signed char (F_API *FSOUND_SetReserved)(int channel, signed char reserved); + signed char (F_API *FSOUND_SetPaused)(int channel, signed char paused); + signed char (F_API *FSOUND_SetLoopMode)(int channel, unsigned int loopmode); + signed char (F_API *FSOUND_SetCurrentPosition)(int channel, unsigned int offset); + signed char (F_API *FSOUND_3D_SetAttributes)(int channel, const float *pos, const float *vel); + signed char (F_API *FSOUND_3D_SetMinMaxDistance)(int channel, float min, float max); + signed char (F_API *FSOUND_IsPlaying)(int channel); + int (F_API *FSOUND_GetFrequency)(int channel); + int (F_API *FSOUND_GetVolume)(int channel); + int (F_API *FSOUND_GetAmplitude)(int channel); + int (F_API *FSOUND_GetPan)(int channel); + signed char (F_API *FSOUND_GetSurround)(int channel); + signed char (F_API *FSOUND_GetMute)(int channel); + int (F_API *FSOUND_GetPriority)(int channel); + signed char (F_API *FSOUND_GetReserved)(int channel); + signed char (F_API *FSOUND_GetPaused)(int channel); + unsigned int (F_API *FSOUND_GetLoopMode)(int channel); + unsigned int (F_API *FSOUND_GetCurrentPosition)(int channel); + FSOUND_SAMPLE * (F_API *FSOUND_GetCurrentSample)(int channel); + signed char (F_API *FSOUND_GetCurrentLevels)(int channel, float *l, float *r); + int (F_API *FSOUND_GetNumSubChannels)(int channel); + int (F_API *FSOUND_GetSubChannel)(int channel, int subchannel); + signed char (F_API *FSOUND_3D_GetAttributes)(int channel, float *pos, float *vel); + signed char (F_API *FSOUND_3D_GetMinMaxDistance)(int channel, float *min, float *max); + void (F_API *FSOUND_3D_SetDopplerFactor)(float scale); + void (F_API *FSOUND_3D_SetDistanceFactor)(float scale); + void (F_API *FSOUND_3D_SetRolloffFactor)(float scale); + void (F_API *FSOUND_3D_Listener_SetCurrent)(int current, int numlisteners); /* use this if you use multiple listeners / splitscreen */ + void (F_API *FSOUND_3D_Listener_SetAttributes)(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz); + void (F_API *FSOUND_3D_Listener_GetAttributes)(float *pos, float *vel, float *fx, float *fy, float *fz, float *tx, float *ty, float *tz); + int (F_API *FSOUND_FX_Enable)(int channel, unsigned int fx); /* See FSOUND_FX_MODES */ + signed char (F_API *FSOUND_FX_Disable)(int channel); + signed char (F_API *FSOUND_FX_SetChorus)(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase); + signed char (F_API *FSOUND_FX_SetCompressor)(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay); + signed char (F_API *FSOUND_FX_SetDistortion)(int fxid, float Gain, float Edge, float PostEQCenterFrequency, float PostEQBandwidth, float PreLowpassCutoff); + signed char (F_API *FSOUND_FX_SetEcho)(int fxid, float WetDryMix, float Feedback, float LeftDelay, float RightDelay, int PanDelay); + signed char (F_API *FSOUND_FX_SetFlanger)(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase); + signed char (F_API *FSOUND_FX_SetGargle)(int fxid, int RateHz, int WaveShape); + 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); + signed char (F_API *FSOUND_FX_SetParamEQ)(int fxid, float Center, float Bandwidth, float Gain); + signed char (F_API *FSOUND_FX_SetWavesReverb)(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio); + signed char (F_API *FSOUND_Stream_SetBufferSize)(int ms); /* call this before opening streams, not after */ + FSOUND_STREAM * (F_API *FSOUND_Stream_Open)(const char *name_or_data, unsigned int mode, int offset, int length); + FSOUND_STREAM * (F_API *FSOUND_Stream_Create)(FSOUND_STREAMCALLBACK callback, int length, unsigned int mode, int samplerate, void *userdata); + signed char (F_API *FSOUND_Stream_Close)(FSOUND_STREAM *stream); + int (F_API *FSOUND_Stream_Play)(int channel, FSOUND_STREAM *stream); + int (F_API *FSOUND_Stream_PlayEx)(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNIT *dsp, signed char startpaused); + signed char (F_API *FSOUND_Stream_Stop)(FSOUND_STREAM *stream); + signed char (F_API *FSOUND_Stream_SetPosition)(FSOUND_STREAM *stream, unsigned int position); + unsigned int (F_API *FSOUND_Stream_GetPosition)(FSOUND_STREAM *stream); + signed char (F_API *FSOUND_Stream_SetTime)(FSOUND_STREAM *stream, int ms); + int (F_API *FSOUND_Stream_GetTime)(FSOUND_STREAM *stream); + int (F_API *FSOUND_Stream_GetLength)(FSOUND_STREAM *stream); + int (F_API *FSOUND_Stream_GetLengthMs)(FSOUND_STREAM *stream); + signed char (F_API *FSOUND_Stream_SetMode)(FSOUND_STREAM *stream, unsigned int mode); + unsigned int (F_API *FSOUND_Stream_GetMode)(FSOUND_STREAM *stream); + signed char (F_API *FSOUND_Stream_SetLoopPoints)(FSOUND_STREAM *stream, unsigned int loopstartpcm, unsigned int loopendpcm); + signed char (F_API *FSOUND_Stream_SetLoopCount)(FSOUND_STREAM *stream, int count); + int (F_API *FSOUND_Stream_GetOpenState)(FSOUND_STREAM *stream); + FSOUND_SAMPLE * (F_API *FSOUND_Stream_GetSample)(FSOUND_STREAM *stream); /* every stream contains a sample to playback on */ + FSOUND_DSPUNIT * (F_API *FSOUND_Stream_CreateDSP)(FSOUND_STREAM *stream, FSOUND_DSPCALLBACK callback, int priority, void *userdata); + signed char (F_API *FSOUND_Stream_SetEndCallback)(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata); + signed char (F_API *FSOUND_Stream_SetSyncCallback)(FSOUND_STREAM *stream, FSOUND_STREAMCALLBACK callback, void *userdata); + FSOUND_SYNCPOINT *(F_API *FSOUND_Stream_AddSyncPoint)(FSOUND_STREAM *stream, unsigned int pcmoffset, const char *name); + signed char (F_API *FSOUND_Stream_DeleteSyncPoint)(FSOUND_SYNCPOINT *point); + int (F_API *FSOUND_Stream_GetNumSyncPoints)(FSOUND_STREAM *stream); + FSOUND_SYNCPOINT *(F_API *FSOUND_Stream_GetSyncPoint)(FSOUND_STREAM *stream, int index); + char * (F_API *FSOUND_Stream_GetSyncPointInfo)(FSOUND_SYNCPOINT *point, unsigned int *pcmoffset); + signed char (F_API *FSOUND_Stream_SetSubStream)(FSOUND_STREAM *stream, int index); + int (F_API *FSOUND_Stream_GetNumSubStreams)(FSOUND_STREAM *stream); + signed char (F_API *FSOUND_Stream_SetSubStreamSentence)(FSOUND_STREAM *stream, const int *sentencelist, int numitems); + signed char (F_API *FSOUND_Stream_GetNumTagFields)(FSOUND_STREAM *stream, int *num); + signed char (F_API *FSOUND_Stream_GetTagField)(FSOUND_STREAM *stream, int num, int *type, char **name, void **value, int *length); + signed char (F_API *FSOUND_Stream_FindTagField)(FSOUND_STREAM *stream, int type, const char *name, void **value, int *length); + signed char (F_API *FSOUND_Stream_Net_SetProxy)(const char *proxy); + signed char (F_API *FSOUND_Stream_Net_SetTimeout)(int timeout); + char * (F_API *FSOUND_Stream_Net_GetLastServerStatus)(); + signed char (F_API *FSOUND_Stream_Net_SetBufferProperties)(int buffersize, int prebuffer_percent, int rebuffer_percent); + signed char (F_API *FSOUND_Stream_Net_GetBufferProperties)(int *buffersize, int *prebuffer_percent, int *rebuffer_percent); + signed char (F_API *FSOUND_Stream_Net_SetMetadataCallback)(FSOUND_STREAM *stream, FSOUND_METADATACALLBACK callback, void *userdata); + signed char (F_API *FSOUND_Stream_Net_GetStatus)(FSOUND_STREAM *stream, int *status, int *bufferpercentused, int *bitrate, unsigned int *flags); + signed char (F_API *FSOUND_CD_Play)(char drive, int track); + void (F_API *FSOUND_CD_SetPlayMode)(char drive, signed char mode); + signed char (F_API *FSOUND_CD_Stop)(char drive); + signed char (F_API *FSOUND_CD_SetPaused)(char drive, signed char paused); + signed char (F_API *FSOUND_CD_SetVolume)(char drive, int volume); + signed char (F_API *FSOUND_CD_SetTrackTime)(char drive, unsigned int ms); + signed char (F_API *FSOUND_CD_OpenTray)(char drive, signed char open); + signed char (F_API *FSOUND_CD_GetPaused)(char drive); + int (F_API *FSOUND_CD_GetTrack)(char drive); + int (F_API *FSOUND_CD_GetNumTracks)(char drive); + int (F_API *FSOUND_CD_GetVolume)(char drive); + int (F_API *FSOUND_CD_GetTrackLength)(char drive, int track); + int (F_API *FSOUND_CD_GetTrackTime)(char drive); + FSOUND_DSPUNIT * (F_API *FSOUND_DSP_Create)(FSOUND_DSPCALLBACK callback, int priority, void *userdata); + void (F_API *FSOUND_DSP_Free)(FSOUND_DSPUNIT *unit); + void (F_API *FSOUND_DSP_SetPriority)(FSOUND_DSPUNIT *unit, int priority); + int (F_API *FSOUND_DSP_GetPriority)(FSOUND_DSPUNIT *unit); + void (F_API *FSOUND_DSP_SetActive)(FSOUND_DSPUNIT *unit, signed char active); + signed char (F_API *FSOUND_DSP_GetActive)(FSOUND_DSPUNIT *unit); + FSOUND_DSPUNIT * (F_API *FSOUND_DSP_GetClearUnit)(); + FSOUND_DSPUNIT * (F_API *FSOUND_DSP_GetSFXUnit)(); + FSOUND_DSPUNIT * (F_API *FSOUND_DSP_GetMusicUnit)(); + FSOUND_DSPUNIT * (F_API *FSOUND_DSP_GetFFTUnit)(); + FSOUND_DSPUNIT * (F_API *FSOUND_DSP_GetClipAndCopyUnit)(); + signed char (F_API *FSOUND_DSP_MixBuffers)(void *destbuffer, void *srcbuffer, int len, int freq, int vol, int pan, unsigned int mode); + void (F_API *FSOUND_DSP_ClearMixBuffer)(); + int (F_API *FSOUND_DSP_GetBufferLength)(); /* Length of each DSP update */ + int (F_API *FSOUND_DSP_GetBufferLengthTotal)(); /* Total buffer length due to FSOUND_SetBufferSize */ + float * (F_API *FSOUND_DSP_GetSpectrum)(); /* Array of 512 floats - call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE)) for this to work. */ + signed char (F_API *FSOUND_Reverb_SetProperties)(const FSOUND_REVERB_PROPERTIES *prop); + signed char (F_API *FSOUND_Reverb_GetProperties)(FSOUND_REVERB_PROPERTIES *prop); + signed char (F_API *FSOUND_Reverb_SetChannelProperties)(int channel, const FSOUND_REVERB_CHANNELPROPERTIES *prop); + signed char (F_API *FSOUND_Reverb_GetChannelProperties)(int channel, FSOUND_REVERB_CHANNELPROPERTIES *prop); + signed char (F_API *FSOUND_Record_SetDriver)(int outputtype); + int (F_API *FSOUND_Record_GetNumDrivers)(); + const char * (F_API *FSOUND_Record_GetDriverName)(int id); + int (F_API *FSOUND_Record_GetDriver)(); + signed char (F_API *FSOUND_Record_StartSample)(FSOUND_SAMPLE *sptr, signed char loop); + signed char (F_API *FSOUND_Record_Stop)(); + int (F_API *FSOUND_Record_GetPosition)(); + FMUSIC_MODULE * (F_API *FMUSIC_LoadSong)(const char *name); + FMUSIC_MODULE * (F_API *FMUSIC_LoadSongEx)(const char *name_or_data, int offset, int length, unsigned int mode, const int *samplelist, int samplelistnum); + int (F_API *FMUSIC_GetOpenState)(FMUSIC_MODULE *mod); + signed char (F_API *FMUSIC_FreeSong)(FMUSIC_MODULE *mod); + signed char (F_API *FMUSIC_PlaySong)(FMUSIC_MODULE *mod); + signed char (F_API *FMUSIC_StopSong)(FMUSIC_MODULE *mod); + void (F_API *FMUSIC_StopAllSongs)(); + signed char (F_API *FMUSIC_SetZxxCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback); + signed char (F_API *FMUSIC_SetRowCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int rowstep); + signed char (F_API *FMUSIC_SetOrderCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int orderstep); + signed char (F_API *FMUSIC_SetInstCallback)(FMUSIC_MODULE *mod, FMUSIC_CALLBACK callback, int instrument); + signed char (F_API *FMUSIC_SetSample)(FMUSIC_MODULE *mod, int sampno, FSOUND_SAMPLE *sptr); + signed char (F_API *FMUSIC_SetUserData)(FMUSIC_MODULE *mod, void *userdata); + signed char (F_API *FMUSIC_OptimizeChannels)(FMUSIC_MODULE *mod, int maxchannels, int minvolume); + signed char (F_API *FMUSIC_SetReverb)(signed char reverb); /* MIDI only */ + signed char (F_API *FMUSIC_SetLooping)(FMUSIC_MODULE *mod, signed char looping); + signed char (F_API *FMUSIC_SetOrder)(FMUSIC_MODULE *mod, int order); + signed char (F_API *FMUSIC_SetPaused)(FMUSIC_MODULE *mod, signed char pause); + signed char (F_API *FMUSIC_SetMasterVolume)(FMUSIC_MODULE *mod, int volume); + signed char (F_API *FMUSIC_SetMasterSpeed)(FMUSIC_MODULE *mode, float speed); + signed char (F_API *FMUSIC_SetPanSeperation)(FMUSIC_MODULE *mod, float pansep); + const char * (F_API *FMUSIC_GetName)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetType)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetNumOrders)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetNumPatterns)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetNumInstruments)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetNumSamples)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetNumChannels)(FMUSIC_MODULE *mod); + FSOUND_SAMPLE * (F_API *FMUSIC_GetSample)(FMUSIC_MODULE *mod, int sampno); + int (F_API *FMUSIC_GetPatternLength)(FMUSIC_MODULE *mod, int orderno); + signed char (F_API *FMUSIC_IsFinished)(FMUSIC_MODULE *mod); + signed char (F_API *FMUSIC_IsPlaying)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetMasterVolume)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetGlobalVolume)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetOrder)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetPattern)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetSpeed)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetBPM)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetRow)(FMUSIC_MODULE *mod); + signed char (F_API *FMUSIC_GetPaused)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetTime)(FMUSIC_MODULE *mod); + int (F_API *FMUSIC_GetRealChannel)(FMUSIC_MODULE *mod, int modchannel); + unsigned int (F_API *FMUSIC_GetUserData)(FMUSIC_MODULE *mod); } FMOD_INSTANCE; -FMOD_INSTANCE *FMOD_CreateInstance(char *dllName) +static FMOD_INSTANCE *FMOD_CreateInstance(char *dllName) { FMOD_INSTANCE *instance; - instance = (FMOD_INSTANCE *) calloc(sizeof(FMOD_INSTANCE), 1); + instance = (FMOD_INSTANCE *)calloc(sizeof(FMOD_INSTANCE), 1); if (!instance) { return NULL; } +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) instance->module = LoadLibrary(dllName); +#else + instance->module = dlopen(dllName, RTLD_LAZY); +#endif if (!instance->module) { free(instance); return NULL; } - #define GETPROC(_x, _y) \ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) + #define F_GETPROC(_x, _y) \ { \ - *((unsigned int *)&instance->_x) = (unsigned int)GetProcAddress(instance->module, _y); \ + *((unsigned int *)&instance->_x) = (unsigned int)GetProcAddress((HMODULE)instance->module, _y); \ if (!instance->_x) \ { \ - FreeLibrary(instance->module); \ + FreeLibrary((HMODULE)instance->module); \ free(instance); \ return NULL; \ } \ } +#else + #define F_GETPROC(_x, _y) \ + { \ + char tmp[] = _y; \ + *(strchr(tmp, '@')) = 0; \ + *((unsigned int *)&instance->_x) = (unsigned int)dlsym(instance->module, &tmp[1]); \ + if (!instance->_x) \ + { \ + dlclose(instance->module); \ + free(instance); \ + return NULL; \ + } \ + } +#endif - GETPROC(FSOUND_SetOutput, "_FSOUND_SetOutput@4"); - GETPROC(FSOUND_SetDriver, "_FSOUND_SetDriver@4"); - GETPROC(FSOUND_SetMixer, "_FSOUND_SetMixer@4"); - GETPROC(FSOUND_SetBufferSize, "_FSOUND_SetBufferSize@4"); - GETPROC(FSOUND_SetHWND, "_FSOUND_SetHWND@4"); - GETPROC(FSOUND_SetMinHardwareChannels, "_FSOUND_SetMinHardwareChannels@4"); - GETPROC(FSOUND_SetMaxHardwareChannels, "_FSOUND_SetMaxHardwareChannels@4"); - GETPROC(FSOUND_SetMemorySystem, "_FSOUND_SetMemorySystem@20"); - GETPROC(FSOUND_Init, "_FSOUND_Init@12"); - GETPROC(FSOUND_Close, "_FSOUND_Close@0"); - GETPROC(FSOUND_SetSFXMasterVolume, "_FSOUND_SetSFXMasterVolume@4"); - GETPROC(FSOUND_SetPanSeperation, "_FSOUND_SetPanSeperation@4"); - GETPROC(FSOUND_SetSpeakerMode, "_FSOUND_SetSpeakerMode@4"); - GETPROC(FSOUND_GetError, "_FSOUND_GetError@0"); - GETPROC(FSOUND_GetVersion, "_FSOUND_GetVersion@0"); - GETPROC(FSOUND_GetOutput, "_FSOUND_GetOutput@0"); - GETPROC(FSOUND_GetOutputHandle, "_FSOUND_GetOutputHandle@0"); - GETPROC(FSOUND_GetDriver, "_FSOUND_GetDriver@0"); - GETPROC(FSOUND_GetMixer, "_FSOUND_GetMixer@0"); - GETPROC(FSOUND_GetNumDrivers, "_FSOUND_GetNumDrivers@0"); - GETPROC(FSOUND_GetDriverName, "_FSOUND_GetDriverName@4"); - GETPROC(FSOUND_GetDriverCaps, "_FSOUND_GetDriverCaps@8"); - GETPROC(FSOUND_GetOutputRate, "_FSOUND_GetOutputRate@0"); - GETPROC(FSOUND_GetMaxChannels, "_FSOUND_GetMaxChannels@0"); - GETPROC(FSOUND_GetMaxSamples, "_FSOUND_GetMaxSamples@0"); - GETPROC(FSOUND_GetSFXMasterVolume, "_FSOUND_GetSFXMasterVolume@0"); - GETPROC(FSOUND_GetNumHardwareChannels, "_FSOUND_GetNumHardwareChannels@0"); - GETPROC(FSOUND_GetChannelsPlaying, "_FSOUND_GetChannelsPlaying@0"); - GETPROC(FSOUND_GetCPUUsage, "_FSOUND_GetCPUUsage@0"); - GETPROC(FSOUND_GetMemoryStats, "_FSOUND_GetMemoryStats@8"); - GETPROC(FSOUND_Sample_Load, "_FSOUND_Sample_Load@16"); - GETPROC(FSOUND_Sample_Alloc, "_FSOUND_Sample_Alloc@28"); - GETPROC(FSOUND_Sample_Free, "_FSOUND_Sample_Free@4"); - GETPROC(FSOUND_Sample_Upload, "_FSOUND_Sample_Upload@12"); - GETPROC(FSOUND_Sample_Lock, "_FSOUND_Sample_Lock@28"); - GETPROC(FSOUND_Sample_Unlock, "_FSOUND_Sample_Unlock@20"); - GETPROC(FSOUND_Sample_SetMode, "_FSOUND_Sample_SetMode@8"); - GETPROC(FSOUND_Sample_SetLoopPoints, "_FSOUND_Sample_SetLoopPoints@12"); - GETPROC(FSOUND_Sample_SetDefaults, "_FSOUND_Sample_SetDefaults@20"); - GETPROC(FSOUND_Sample_SetMinMaxDistance, "_FSOUND_Sample_SetMinMaxDistance@12"); - GETPROC(FSOUND_Sample_SetMaxPlaybacks, "_FSOUND_Sample_SetMaxPlaybacks@8"); - GETPROC(FSOUND_Sample_Get, "_FSOUND_Sample_Get@4"); - GETPROC(FSOUND_Sample_GetName, "_FSOUND_Sample_GetName@4"); - GETPROC(FSOUND_Sample_GetLength, "_FSOUND_Sample_GetLength@4"); - GETPROC(FSOUND_Sample_GetLoopPoints, "_FSOUND_Sample_GetLoopPoints@12"); - GETPROC(FSOUND_Sample_GetDefaults, "_FSOUND_Sample_GetDefaults@20"); - GETPROC(FSOUND_Sample_GetMode, "_FSOUND_Sample_GetMode@4"); - GETPROC(FSOUND_PlaySound, "_FSOUND_PlaySound@8"); - GETPROC(FSOUND_PlaySoundEx, "_FSOUND_PlaySoundEx@16"); - GETPROC(FSOUND_StopSound, "_FSOUND_StopSound@4"); - GETPROC(FSOUND_SetFrequency, "_FSOUND_SetFrequency@8"); - GETPROC(FSOUND_SetVolume, "_FSOUND_SetVolume@8"); - GETPROC(FSOUND_SetVolumeAbsolute, "_FSOUND_SetVolumeAbsolute@8"); - GETPROC(FSOUND_SetPan, "_FSOUND_SetPan@8"); - GETPROC(FSOUND_SetSurround, "_FSOUND_SetSurround@8"); - GETPROC(FSOUND_SetMute, "_FSOUND_SetMute@8"); - GETPROC(FSOUND_SetPriority, "_FSOUND_SetPriority@8"); - GETPROC(FSOUND_SetReserved, "_FSOUND_SetReserved@8"); - GETPROC(FSOUND_SetPaused, "_FSOUND_SetPaused@8"); - GETPROC(FSOUND_SetLoopMode, "_FSOUND_SetLoopMode@8"); - GETPROC(FSOUND_IsPlaying, "_FSOUND_IsPlaying@4"); - GETPROC(FSOUND_GetFrequency, "_FSOUND_GetFrequency@4"); - GETPROC(FSOUND_GetVolume, "_FSOUND_GetVolume@4"); - GETPROC(FSOUND_GetPan, "_FSOUND_GetPan@4"); - GETPROC(FSOUND_GetSurround, "_FSOUND_GetSurround@4"); - GETPROC(FSOUND_GetMute, "_FSOUND_GetMute@4"); - GETPROC(FSOUND_GetPriority, "_FSOUND_GetPriority@4"); - GETPROC(FSOUND_GetReserved, "_FSOUND_GetReserved@4"); - GETPROC(FSOUND_GetPaused, "_FSOUND_GetPaused@4"); - GETPROC(FSOUND_GetLoopMode, "_FSOUND_GetLoopMode@4"); - GETPROC(FSOUND_GetCurrentPosition, "_FSOUND_GetCurrentPosition@4"); - GETPROC(FSOUND_SetCurrentPosition, "_FSOUND_SetCurrentPosition@8"); - GETPROC(FSOUND_GetCurrentSample, "_FSOUND_GetCurrentSample@4"); - GETPROC(FSOUND_GetCurrentLevels, "_FSOUND_GetCurrentLevels@12"); - GETPROC(FSOUND_FX_Enable, "_FSOUND_FX_Enable@8"); - GETPROC(FSOUND_FX_Disable, "_FSOUND_FX_Disable@4"); - GETPROC(FSOUND_FX_SetChorus, "_FSOUND_FX_SetChorus@32"); - GETPROC(FSOUND_FX_SetCompressor, "_FSOUND_FX_SetCompressor@28"); - GETPROC(FSOUND_FX_SetDistortion, "_FSOUND_FX_SetDistortion@24"); - GETPROC(FSOUND_FX_SetEcho, "_FSOUND_FX_SetEcho@24"); - GETPROC(FSOUND_FX_SetFlanger, "_FSOUND_FX_SetFlanger@32"); - GETPROC(FSOUND_FX_SetGargle, "_FSOUND_FX_SetGargle@12"); - GETPROC(FSOUND_FX_SetI3DL2Reverb, "_FSOUND_FX_SetI3DL2Reverb@52"); - GETPROC(FSOUND_FX_SetParamEQ, "_FSOUND_FX_SetParamEQ@16"); - GETPROC(FSOUND_FX_SetWavesReverb, "_FSOUND_FX_SetWavesReverb@20"); - GETPROC(FSOUND_Update, "_FSOUND_Update@0"); - GETPROC(FSOUND_3D_SetAttributes, "_FSOUND_3D_SetAttributes@12"); - GETPROC(FSOUND_3D_GetAttributes, "_FSOUND_3D_GetAttributes@12"); - GETPROC(FSOUND_3D_Listener_SetCurrent, "_FSOUND_3D_Listener_SetCurrent@8"); - GETPROC(FSOUND_3D_Listener_SetAttributes, "_FSOUND_3D_Listener_SetAttributes@32"); - GETPROC(FSOUND_3D_Listener_GetAttributes, "_FSOUND_3D_Listener_GetAttributes@32"); - GETPROC(FSOUND_3D_SetDopplerFactor, "_FSOUND_3D_SetDopplerFactor@4"); - GETPROC(FSOUND_3D_SetDistanceFactor, "_FSOUND_3D_SetDistanceFactor@4"); - GETPROC(FSOUND_3D_SetRolloffFactor, "_FSOUND_3D_SetRolloffFactor@4"); - GETPROC(FSOUND_Stream_OpenFile, "_FSOUND_Stream_OpenFile@12"); - GETPROC(FSOUND_Stream_Create, "_FSOUND_Stream_Create@20"); - GETPROC(FSOUND_Stream_Play, "_FSOUND_Stream_Play@8"); - GETPROC(FSOUND_Stream_PlayEx, "_FSOUND_Stream_PlayEx@16"); - GETPROC(FSOUND_Stream_Stop, "_FSOUND_Stream_Stop@4"); - GETPROC(FSOUND_Stream_Close, "_FSOUND_Stream_Close@4"); - GETPROC(FSOUND_Stream_SetEndCallback, "_FSOUND_Stream_SetEndCallback@12"); - GETPROC(FSOUND_Stream_SetSynchCallback, "_FSOUND_Stream_SetSynchCallback@12"); - GETPROC(FSOUND_Stream_GetSample, "_FSOUND_Stream_GetSample@4"); - GETPROC(FSOUND_Stream_CreateDSP, "_FSOUND_Stream_CreateDSP@16"); - GETPROC(FSOUND_Stream_SetBufferSize, "_FSOUND_Stream_SetBufferSize@4"); - GETPROC(FSOUND_Stream_SetPosition, "_FSOUND_Stream_SetPosition@8"); - GETPROC(FSOUND_Stream_GetPosition, "_FSOUND_Stream_GetPosition@4"); - GETPROC(FSOUND_Stream_SetTime, "_FSOUND_Stream_SetTime@8"); - GETPROC(FSOUND_Stream_GetTime, "_FSOUND_Stream_GetTime@4"); - GETPROC(FSOUND_Stream_GetLength, "_FSOUND_Stream_GetLength@4"); - GETPROC(FSOUND_Stream_GetLengthMs, "_FSOUND_Stream_GetLengthMs@4"); - GETPROC(FSOUND_Stream_SetSubStream, "_FSOUND_Stream_SetSubStream@8"); - GETPROC(FSOUND_Stream_GetNumSubStreams, "_FSOUND_Stream_GetNumSubStreams@4"); - GETPROC(FSOUND_Stream_SetLoopPoints, "_FSOUND_Stream_SetLoopPoints@12"); - GETPROC(FSOUND_Stream_AddSynchPoint, "_FSOUND_Stream_AddSynchPoint@12"); - GETPROC(FSOUND_Stream_DeleteSynchPoint, "_FSOUND_Stream_DeleteSynchPoint@8"); - GETPROC(FSOUND_Stream_GetNumSynchPoints, "_FSOUND_Stream_GetNumSynchPoints@4"); - GETPROC(FSOUND_Stream_GetOpenState, "_FSOUND_Stream_GetOpenState@4"); - GETPROC(FSOUND_CD_Play, "_FSOUND_CD_Play@8"); - GETPROC(FSOUND_CD_SetPlayMode, "_FSOUND_CD_SetPlayMode@8"); - GETPROC(FSOUND_CD_Stop, "_FSOUND_CD_Stop@4"); - GETPROC(FSOUND_CD_SetPaused, "_FSOUND_CD_SetPaused@8"); - GETPROC(FSOUND_CD_SetVolume, "_FSOUND_CD_SetVolume@8"); - GETPROC(FSOUND_CD_Eject, "_FSOUND_CD_Eject@4"); - GETPROC(FSOUND_CD_GetPaused, "_FSOUND_CD_GetPaused@4"); - GETPROC(FSOUND_CD_GetTrack, "_FSOUND_CD_GetTrack@4"); - GETPROC(FSOUND_CD_GetNumTracks, "_FSOUND_CD_GetNumTracks@4"); - GETPROC(FSOUND_CD_GetVolume, "_FSOUND_CD_GetVolume@4"); - GETPROC(FSOUND_CD_GetTrackLength, "_FSOUND_CD_GetTrackLength@8"); - GETPROC(FSOUND_CD_GetTrackTime, "_FSOUND_CD_GetTrackTime@4"); - GETPROC(FSOUND_DSP_Create, "_FSOUND_DSP_Create@12"); - GETPROC(FSOUND_DSP_Free, "_FSOUND_DSP_Free@4"); - GETPROC(FSOUND_DSP_SetPriority, "_FSOUND_DSP_SetPriority@8"); - GETPROC(FSOUND_DSP_GetPriority, "_FSOUND_DSP_GetPriority@4"); - GETPROC(FSOUND_DSP_SetActive, "_FSOUND_DSP_SetActive@8"); - GETPROC(FSOUND_DSP_GetActive, "_FSOUND_DSP_GetActive@4"); - GETPROC(FSOUND_DSP_GetClearUnit, "_FSOUND_DSP_GetClearUnit@0"); - GETPROC(FSOUND_DSP_GetSFXUnit, "_FSOUND_DSP_GetSFXUnit@0"); - GETPROC(FSOUND_DSP_GetMusicUnit, "_FSOUND_DSP_GetMusicUnit@0"); - GETPROC(FSOUND_DSP_GetClipAndCopyUnit, "_FSOUND_DSP_GetClipAndCopyUnit@0"); - GETPROC(FSOUND_DSP_GetFFTUnit, "_FSOUND_DSP_GetFFTUnit@0"); - GETPROC(FSOUND_DSP_MixBuffers, "_FSOUND_DSP_MixBuffers@28"); - GETPROC(FSOUND_DSP_ClearMixBuffer, "_FSOUND_DSP_ClearMixBuffer@0"); - GETPROC(FSOUND_DSP_GetBufferLength, "_FSOUND_DSP_GetBufferLength@0"); - GETPROC(FSOUND_DSP_GetBufferLengthTotal, "_FSOUND_DSP_GetBufferLengthTotal@0"); - GETPROC(FSOUND_DSP_GetSpectrum, "_FSOUND_DSP_GetSpectrum@0"); - GETPROC(FSOUND_Reverb_SetProperties, "_FSOUND_Reverb_SetProperties@4"); - GETPROC(FSOUND_Reverb_GetProperties, "_FSOUND_Reverb_GetProperties@4"); - GETPROC(FSOUND_Reverb_SetChannelProperties, "_FSOUND_Reverb_SetChannelProperties@8"); - GETPROC(FSOUND_Reverb_GetChannelProperties, "_FSOUND_Reverb_GetChannelProperties@8"); - GETPROC(FSOUND_Record_SetDriver, "_FSOUND_Record_SetDriver@4"); - GETPROC(FSOUND_Record_GetNumDrivers, "_FSOUND_Record_GetNumDrivers@0"); - GETPROC(FSOUND_Record_GetDriverName, "_FSOUND_Record_GetDriverName@4"); - GETPROC(FSOUND_Record_GetDriver, "_FSOUND_Record_GetDriver@0"); - GETPROC(FSOUND_Record_StartSample, "_FSOUND_Record_StartSample@8"); - GETPROC(FSOUND_Record_Stop, "_FSOUND_Record_Stop@0"); - GETPROC(FSOUND_Record_GetPosition, "_FSOUND_Record_GetPosition@0"); - GETPROC(FSOUND_File_SetCallbacks, "_FSOUND_File_SetCallbacks@20"); - GETPROC(FMUSIC_LoadSong, "_FMUSIC_LoadSong@4"); - GETPROC(FMUSIC_LoadSongMemory, "_FMUSIC_LoadSongMemory@8"); - GETPROC(FMUSIC_FreeSong, "_FMUSIC_FreeSong@4"); - GETPROC(FMUSIC_PlaySong, "_FMUSIC_PlaySong@4"); - GETPROC(FMUSIC_StopSong, "_FMUSIC_StopSong@4"); - GETPROC(FMUSIC_StopAllSongs, "_FMUSIC_StopAllSongs@0"); - GETPROC(FMUSIC_SetZxxCallback, "_FMUSIC_SetZxxCallback@8"); - GETPROC(FMUSIC_SetRowCallback, "_FMUSIC_SetRowCallback@12"); - GETPROC(FMUSIC_SetOrderCallback, "_FMUSIC_SetOrderCallback@12"); - GETPROC(FMUSIC_SetInstCallback, "_FMUSIC_SetInstCallback@12"); - GETPROC(FMUSIC_SetSample, "_FMUSIC_SetSample@12"); - GETPROC(FMUSIC_SetUserData, "_FMUSIC_SetUserData@8"); - GETPROC(FMUSIC_OptimizeChannels, "_FMUSIC_OptimizeChannels@12"); - GETPROC(FMUSIC_SetReverb, "_FMUSIC_SetReverb@4"); - GETPROC(FMUSIC_SetLooping, "_FMUSIC_SetLooping@8"); - GETPROC(FMUSIC_SetOrder, "_FMUSIC_SetOrder@8"); - GETPROC(FMUSIC_SetPaused, "_FMUSIC_SetPaused@8"); - GETPROC(FMUSIC_SetMasterVolume, "_FMUSIC_SetMasterVolume@8"); - GETPROC(FMUSIC_SetMasterSpeed, "_FMUSIC_SetMasterSpeed@8"); - GETPROC(FMUSIC_SetPanSeperation, "_FMUSIC_SetPanSeperation@8"); - GETPROC(FMUSIC_GetName, "_FMUSIC_GetName@4"); - GETPROC(FMUSIC_GetType, "_FMUSIC_GetType@4"); - GETPROC(FMUSIC_GetNumOrders, "_FMUSIC_GetNumOrders@4"); - GETPROC(FMUSIC_GetNumPatterns, "_FMUSIC_GetNumPatterns@4"); - GETPROC(FMUSIC_GetNumInstruments, "_FMUSIC_GetNumInstruments@4"); - GETPROC(FMUSIC_GetNumSamples, "_FMUSIC_GetNumSamples@4"); - GETPROC(FMUSIC_GetNumChannels, "_FMUSIC_GetNumChannels@4"); - GETPROC(FMUSIC_GetSample, "_FMUSIC_GetSample@8"); - GETPROC(FMUSIC_GetPatternLength, "_FMUSIC_GetPatternLength@8"); - GETPROC(FMUSIC_IsFinished, "_FMUSIC_IsFinished@4"); - GETPROC(FMUSIC_IsPlaying, "_FMUSIC_IsPlaying@4"); - GETPROC(FMUSIC_GetMasterVolume, "_FMUSIC_GetMasterVolume@4"); - GETPROC(FMUSIC_GetGlobalVolume, "_FMUSIC_GetGlobalVolume@4"); - GETPROC(FMUSIC_GetOrder, "_FMUSIC_GetOrder@4"); - GETPROC(FMUSIC_GetPattern, "_FMUSIC_GetPattern@4"); - GETPROC(FMUSIC_GetSpeed, "_FMUSIC_GetSpeed@4"); - GETPROC(FMUSIC_GetBPM, "_FMUSIC_GetBPM@4"); - GETPROC(FMUSIC_GetRow, "_FMUSIC_GetRow@4"); - GETPROC(FMUSIC_GetPaused, "_FMUSIC_GetPaused@4"); - GETPROC(FMUSIC_GetTime, "_FMUSIC_GetTime@4"); - GETPROC(FMUSIC_GetRealChannel, "_FMUSIC_GetRealChannel@8"); - GETPROC(FMUSIC_GetUserData, "_FMUSIC_GetUserData@4"); + F_GETPROC(FSOUND_SetOutput, "_FSOUND_SetOutput@4"); + F_GETPROC(FSOUND_SetDriver, "_FSOUND_SetDriver@4"); + F_GETPROC(FSOUND_SetMixer, "_FSOUND_SetMixer@4"); + F_GETPROC(FSOUND_SetBufferSize, "_FSOUND_SetBufferSize@4"); + F_GETPROC(FSOUND_SetHWND, "_FSOUND_SetHWND@4"); + F_GETPROC(FSOUND_SetMinHardwareChannels, "_FSOUND_SetMinHardwareChannels@4"); + F_GETPROC(FSOUND_SetMaxHardwareChannels, "_FSOUND_SetMaxHardwareChannels@4"); + F_GETPROC(FSOUND_SetMemorySystem, "_FSOUND_SetMemorySystem@20"); + F_GETPROC(FSOUND_Init, "_FSOUND_Init@12"); + F_GETPROC(FSOUND_Close, "_FSOUND_Close@0"); + F_GETPROC(FSOUND_Update, "_FSOUND_Update@0"); + F_GETPROC(FSOUND_SetSFXMasterVolume, "_FSOUND_SetSFXMasterVolume@4"); + F_GETPROC(FSOUND_SetPanSeperation, "_FSOUND_SetPanSeperation@4"); + F_GETPROC(FSOUND_SetSpeakerMode, "_FSOUND_SetSpeakerMode@4"); + F_GETPROC(FSOUND_GetError, "_FSOUND_GetError@0"); + F_GETPROC(FSOUND_GetVersion, "_FSOUND_GetVersion@0"); + F_GETPROC(FSOUND_GetOutput, "_FSOUND_GetOutput@0"); + F_GETPROC(FSOUND_GetOutputHandle, "_FSOUND_GetOutputHandle@0"); + F_GETPROC(FSOUND_GetDriver, "_FSOUND_GetDriver@0"); + F_GETPROC(FSOUND_GetMixer, "_FSOUND_GetMixer@0"); + F_GETPROC(FSOUND_GetNumDrivers, "_FSOUND_GetNumDrivers@0"); + F_GETPROC(FSOUND_GetDriverName, "_FSOUND_GetDriverName@4"); + F_GETPROC(FSOUND_GetDriverCaps, "_FSOUND_GetDriverCaps@8"); + F_GETPROC(FSOUND_GetOutputRate, "_FSOUND_GetOutputRate@0"); + F_GETPROC(FSOUND_GetMaxChannels, "_FSOUND_GetMaxChannels@0"); + F_GETPROC(FSOUND_GetMaxSamples, "_FSOUND_GetMaxSamples@0"); + F_GETPROC(FSOUND_GetSpeakerMode, "_FSOUND_GetSpeakerMode@0"); + F_GETPROC(FSOUND_GetSFXMasterVolume, "_FSOUND_GetSFXMasterVolume@0"); + F_GETPROC(FSOUND_GetNumHWChannels, "_FSOUND_GetNumHWChannels@12"); + F_GETPROC(FSOUND_GetChannelsPlaying, "_FSOUND_GetChannelsPlaying@0"); + F_GETPROC(FSOUND_GetCPUUsage, "_FSOUND_GetCPUUsage@0"); + F_GETPROC(FSOUND_GetMemoryStats, "_FSOUND_GetMemoryStats@8"); + F_GETPROC(FSOUND_Sample_Load, "_FSOUND_Sample_Load@20"); + F_GETPROC(FSOUND_Sample_Alloc, "_FSOUND_Sample_Alloc@28"); + F_GETPROC(FSOUND_Sample_Free, "_FSOUND_Sample_Free@4"); + F_GETPROC(FSOUND_Sample_Upload, "_FSOUND_Sample_Upload@12"); + F_GETPROC(FSOUND_Sample_Lock, "_FSOUND_Sample_Lock@28"); + F_GETPROC(FSOUND_Sample_Unlock, "_FSOUND_Sample_Unlock@20"); + F_GETPROC(FSOUND_Sample_SetMode, "_FSOUND_Sample_SetMode@8"); + F_GETPROC(FSOUND_Sample_SetLoopPoints, "_FSOUND_Sample_SetLoopPoints@12"); + F_GETPROC(FSOUND_Sample_SetDefaults, "_FSOUND_Sample_SetDefaults@20"); + F_GETPROC(FSOUND_Sample_SetDefaultsEx, "_FSOUND_Sample_SetDefaultsEx@32"); + F_GETPROC(FSOUND_Sample_SetMinMaxDistance, "_FSOUND_Sample_SetMinMaxDistance@12"); + F_GETPROC(FSOUND_Sample_SetMaxPlaybacks, "_FSOUND_Sample_SetMaxPlaybacks@8"); + F_GETPROC(FSOUND_Sample_Get, "_FSOUND_Sample_Get@4"); + F_GETPROC(FSOUND_Sample_GetName, "_FSOUND_Sample_GetName@4"); + F_GETPROC(FSOUND_Sample_GetLength, "_FSOUND_Sample_GetLength@4"); + F_GETPROC(FSOUND_Sample_GetLoopPoints, "_FSOUND_Sample_GetLoopPoints@12"); + F_GETPROC(FSOUND_Sample_GetDefaults, "_FSOUND_Sample_GetDefaults@20"); + F_GETPROC(FSOUND_Sample_GetDefaultsEx, "_FSOUND_Sample_GetDefaultsEx@32"); + F_GETPROC(FSOUND_Sample_GetMode, "_FSOUND_Sample_GetMode@4"); + F_GETPROC(FSOUND_Sample_GetMinMaxDistance, "_FSOUND_Sample_GetMinMaxDistance@12"); + F_GETPROC(FSOUND_PlaySound, "_FSOUND_PlaySound@8"); + F_GETPROC(FSOUND_PlaySoundEx, "_FSOUND_PlaySoundEx@16"); + F_GETPROC(FSOUND_StopSound, "_FSOUND_StopSound@4"); + F_GETPROC(FSOUND_SetFrequency, "_FSOUND_SetFrequency@8"); + F_GETPROC(FSOUND_SetVolume, "_FSOUND_SetVolume@8"); + F_GETPROC(FSOUND_SetVolumeAbsolute, "_FSOUND_SetVolumeAbsolute@8"); + F_GETPROC(FSOUND_SetPan, "_FSOUND_SetPan@8"); + F_GETPROC(FSOUND_SetSurround, "_FSOUND_SetSurround@8"); + F_GETPROC(FSOUND_SetMute, "_FSOUND_SetMute@8"); + F_GETPROC(FSOUND_SetPriority, "_FSOUND_SetPriority@8"); + F_GETPROC(FSOUND_SetReserved, "_FSOUND_SetReserved@8"); + F_GETPROC(FSOUND_SetPaused, "_FSOUND_SetPaused@8"); + F_GETPROC(FSOUND_SetLoopMode, "_FSOUND_SetLoopMode@8"); + F_GETPROC(FSOUND_SetCurrentPosition, "_FSOUND_SetCurrentPosition@8"); + F_GETPROC(FSOUND_3D_SetAttributes, "_FSOUND_3D_SetAttributes@12"); + F_GETPROC(FSOUND_3D_SetMinMaxDistance, "_FSOUND_3D_SetMinMaxDistance@12"); + F_GETPROC(FSOUND_IsPlaying, "_FSOUND_IsPlaying@4"); + F_GETPROC(FSOUND_GetFrequency, "_FSOUND_GetFrequency@4"); + F_GETPROC(FSOUND_GetVolume, "_FSOUND_GetVolume@4"); + F_GETPROC(FSOUND_GetAmplitude, "_FSOUND_GetAmplitude@4"); + F_GETPROC(FSOUND_GetPan, "_FSOUND_GetPan@4"); + F_GETPROC(FSOUND_GetSurround, "_FSOUND_GetSurround@4"); + F_GETPROC(FSOUND_GetMute, "_FSOUND_GetMute@4"); + F_GETPROC(FSOUND_GetPriority, "_FSOUND_GetPriority@4"); + F_GETPROC(FSOUND_GetReserved, "_FSOUND_GetReserved@4"); + F_GETPROC(FSOUND_GetPaused, "_FSOUND_GetPaused@4"); + F_GETPROC(FSOUND_GetLoopMode, "_FSOUND_GetLoopMode@4"); + F_GETPROC(FSOUND_GetCurrentPosition, "_FSOUND_GetCurrentPosition@4"); + F_GETPROC(FSOUND_GetCurrentSample, "_FSOUND_GetCurrentSample@4"); + F_GETPROC(FSOUND_GetCurrentLevels, "_FSOUND_GetCurrentLevels@12"); + F_GETPROC(FSOUND_GetNumSubChannels, "_FSOUND_GetNumSubChannels@4"); + F_GETPROC(FSOUND_GetSubChannel, "_FSOUND_GetSubChannel@8"); + F_GETPROC(FSOUND_3D_GetAttributes, "_FSOUND_3D_GetAttributes@12"); + F_GETPROC(FSOUND_3D_GetMinMaxDistance, "_FSOUND_3D_GetMinMaxDistance@12"); + F_GETPROC(FSOUND_3D_Listener_SetCurrent, "_FSOUND_3D_Listener_SetCurrent@8"); + F_GETPROC(FSOUND_3D_Listener_SetAttributes, "_FSOUND_3D_Listener_SetAttributes@32"); + F_GETPROC(FSOUND_3D_Listener_GetAttributes, "_FSOUND_3D_Listener_GetAttributes@32"); + F_GETPROC(FSOUND_3D_SetDopplerFactor, "_FSOUND_3D_SetDopplerFactor@4"); + F_GETPROC(FSOUND_3D_SetDistanceFactor, "_FSOUND_3D_SetDistanceFactor@4"); + F_GETPROC(FSOUND_3D_SetRolloffFactor, "_FSOUND_3D_SetRolloffFactor@4"); + F_GETPROC(FSOUND_FX_Enable, "_FSOUND_FX_Enable@8"); + F_GETPROC(FSOUND_FX_Disable, "_FSOUND_FX_Disable@4"); + F_GETPROC(FSOUND_FX_SetChorus, "_FSOUND_FX_SetChorus@32"); + F_GETPROC(FSOUND_FX_SetCompressor, "_FSOUND_FX_SetCompressor@28"); + F_GETPROC(FSOUND_FX_SetDistortion, "_FSOUND_FX_SetDistortion@24"); + F_GETPROC(FSOUND_FX_SetEcho, "_FSOUND_FX_SetEcho@24"); + F_GETPROC(FSOUND_FX_SetFlanger, "_FSOUND_FX_SetFlanger@32"); + F_GETPROC(FSOUND_FX_SetGargle, "_FSOUND_FX_SetGargle@12"); + F_GETPROC(FSOUND_FX_SetI3DL2Reverb, "_FSOUND_FX_SetI3DL2Reverb@52"); + F_GETPROC(FSOUND_FX_SetParamEQ, "_FSOUND_FX_SetParamEQ@16"); + F_GETPROC(FSOUND_FX_SetWavesReverb, "_FSOUND_FX_SetWavesReverb@20"); + F_GETPROC(FSOUND_Stream_Open, "_FSOUND_Stream_Open@16"); + F_GETPROC(FSOUND_Stream_Create, "_FSOUND_Stream_Create@20"); + F_GETPROC(FSOUND_Stream_Play, "_FSOUND_Stream_Play@8"); + F_GETPROC(FSOUND_Stream_PlayEx, "_FSOUND_Stream_PlayEx@16"); + F_GETPROC(FSOUND_Stream_Stop, "_FSOUND_Stream_Stop@4"); + F_GETPROC(FSOUND_Stream_Close, "_FSOUND_Stream_Close@4"); + F_GETPROC(FSOUND_Stream_SetEndCallback, "_FSOUND_Stream_SetEndCallback@12"); + F_GETPROC(FSOUND_Stream_SetSyncCallback, "_FSOUND_Stream_SetSyncCallback@12"); + F_GETPROC(FSOUND_Stream_GetSample, "_FSOUND_Stream_GetSample@4"); + F_GETPROC(FSOUND_Stream_CreateDSP, "_FSOUND_Stream_CreateDSP@16"); + F_GETPROC(FSOUND_Stream_SetBufferSize, "_FSOUND_Stream_SetBufferSize@4"); + F_GETPROC(FSOUND_Stream_SetPosition, "_FSOUND_Stream_SetPosition@8"); + F_GETPROC(FSOUND_Stream_GetPosition, "_FSOUND_Stream_GetPosition@4"); + F_GETPROC(FSOUND_Stream_SetTime, "_FSOUND_Stream_SetTime@8"); + F_GETPROC(FSOUND_Stream_GetTime, "_FSOUND_Stream_GetTime@4"); + F_GETPROC(FSOUND_Stream_GetLength, "_FSOUND_Stream_GetLength@4"); + F_GETPROC(FSOUND_Stream_GetLengthMs, "_FSOUND_Stream_GetLengthMs@4"); + F_GETPROC(FSOUND_Stream_SetMode, "_FSOUND_Stream_SetMode@8"); + F_GETPROC(FSOUND_Stream_GetMode, "_FSOUND_Stream_GetMode@4"); + F_GETPROC(FSOUND_Stream_SetSubStream, "_FSOUND_Stream_SetSubStream@8"); + F_GETPROC(FSOUND_Stream_GetNumSubStreams, "_FSOUND_Stream_GetNumSubStreams@4"); + F_GETPROC(FSOUND_Stream_SetSubStreamSentence, "_FSOUND_Stream_SetSubStreamSentence@12"); + F_GETPROC(FSOUND_Stream_SetLoopPoints, "_FSOUND_Stream_SetLoopPoints@12"); + F_GETPROC(FSOUND_Stream_SetLoopCount, "_FSOUND_Stream_SetLoopCount@8"); + F_GETPROC(FSOUND_Stream_AddSyncPoint, "_FSOUND_Stream_AddSyncPoint@12"); + F_GETPROC(FSOUND_Stream_DeleteSyncPoint, "_FSOUND_Stream_DeleteSyncPoint@4"); + F_GETPROC(FSOUND_Stream_GetNumSyncPoints, "_FSOUND_Stream_GetNumSyncPoints@4"); + F_GETPROC(FSOUND_Stream_GetSyncPoint, "_FSOUND_Stream_GetSyncPoint@8"); + F_GETPROC(FSOUND_Stream_GetSyncPointInfo, "_FSOUND_Stream_GetSyncPointInfo@8"); + F_GETPROC(FSOUND_Stream_GetOpenState, "_FSOUND_Stream_GetOpenState@4"); + F_GETPROC(FSOUND_Stream_GetNumTagFields, "_FSOUND_Stream_GetNumTagFields@8"); + F_GETPROC(FSOUND_Stream_GetTagField, "_FSOUND_Stream_GetTagField@24"); + F_GETPROC(FSOUND_Stream_FindTagField, "_FSOUND_Stream_FindTagField@20"); + F_GETPROC(FSOUND_Stream_Net_SetProxy, "_FSOUND_Stream_Net_SetProxy@4"); + F_GETPROC(FSOUND_Stream_Net_GetLastServerStatus, "_FSOUND_Stream_Net_GetLastServerStatus@0"); + F_GETPROC(FSOUND_Stream_Net_SetBufferProperties, "_FSOUND_Stream_Net_SetBufferProperties@12"); + F_GETPROC(FSOUND_Stream_Net_GetBufferProperties, "_FSOUND_Stream_Net_GetBufferProperties@12"); + F_GETPROC(FSOUND_Stream_Net_SetMetadataCallback, "_FSOUND_Stream_Net_SetMetadataCallback@12"); + F_GETPROC(FSOUND_Stream_Net_GetStatus, "_FSOUND_Stream_Net_GetStatus@20"); + F_GETPROC(FSOUND_CD_Play, "_FSOUND_CD_Play@8"); + F_GETPROC(FSOUND_CD_SetPlayMode, "_FSOUND_CD_SetPlayMode@8"); + F_GETPROC(FSOUND_CD_Stop, "_FSOUND_CD_Stop@4"); + F_GETPROC(FSOUND_CD_SetPaused, "_FSOUND_CD_SetPaused@8"); + F_GETPROC(FSOUND_CD_SetVolume, "_FSOUND_CD_SetVolume@8"); + F_GETPROC(FSOUND_CD_SetTrackTime, "_FSOUND_CD_SetTrackTime@8"); + F_GETPROC(FSOUND_CD_OpenTray, "_FSOUND_CD_OpenTray@8"); + F_GETPROC(FSOUND_CD_GetPaused, "_FSOUND_CD_GetPaused@4"); + F_GETPROC(FSOUND_CD_GetTrack, "_FSOUND_CD_GetTrack@4"); + F_GETPROC(FSOUND_CD_GetNumTracks, "_FSOUND_CD_GetNumTracks@4"); + F_GETPROC(FSOUND_CD_GetVolume, "_FSOUND_CD_GetVolume@4"); + F_GETPROC(FSOUND_CD_GetTrackLength, "_FSOUND_CD_GetTrackLength@8"); + F_GETPROC(FSOUND_CD_GetTrackTime, "_FSOUND_CD_GetTrackTime@4"); + F_GETPROC(FSOUND_DSP_Create, "_FSOUND_DSP_Create@12"); + F_GETPROC(FSOUND_DSP_Free, "_FSOUND_DSP_Free@4"); + F_GETPROC(FSOUND_DSP_SetPriority, "_FSOUND_DSP_SetPriority@8"); + F_GETPROC(FSOUND_DSP_GetPriority, "_FSOUND_DSP_GetPriority@4"); + F_GETPROC(FSOUND_DSP_SetActive, "_FSOUND_DSP_SetActive@8"); + F_GETPROC(FSOUND_DSP_GetActive, "_FSOUND_DSP_GetActive@4"); + F_GETPROC(FSOUND_DSP_GetClearUnit, "_FSOUND_DSP_GetClearUnit@0"); + F_GETPROC(FSOUND_DSP_GetSFXUnit, "_FSOUND_DSP_GetSFXUnit@0"); + F_GETPROC(FSOUND_DSP_GetMusicUnit, "_FSOUND_DSP_GetMusicUnit@0"); + F_GETPROC(FSOUND_DSP_GetClipAndCopyUnit, "_FSOUND_DSP_GetClipAndCopyUnit@0"); + F_GETPROC(FSOUND_DSP_GetFFTUnit, "_FSOUND_DSP_GetFFTUnit@0"); + F_GETPROC(FSOUND_DSP_MixBuffers, "_FSOUND_DSP_MixBuffers@28"); + F_GETPROC(FSOUND_DSP_ClearMixBuffer, "_FSOUND_DSP_ClearMixBuffer@0"); + F_GETPROC(FSOUND_DSP_GetBufferLength, "_FSOUND_DSP_GetBufferLength@0"); + F_GETPROC(FSOUND_DSP_GetBufferLengthTotal, "_FSOUND_DSP_GetBufferLengthTotal@0"); + F_GETPROC(FSOUND_DSP_GetSpectrum, "_FSOUND_DSP_GetSpectrum@0"); + F_GETPROC(FSOUND_Reverb_SetProperties, "_FSOUND_Reverb_SetProperties@4"); + F_GETPROC(FSOUND_Reverb_GetProperties, "_FSOUND_Reverb_GetProperties@4"); + F_GETPROC(FSOUND_Reverb_SetChannelProperties, "_FSOUND_Reverb_SetChannelProperties@8"); + F_GETPROC(FSOUND_Reverb_GetChannelProperties, "_FSOUND_Reverb_GetChannelProperties@8"); + F_GETPROC(FSOUND_Record_SetDriver, "_FSOUND_Record_SetDriver@4"); + F_GETPROC(FSOUND_Record_GetNumDrivers, "_FSOUND_Record_GetNumDrivers@0"); + F_GETPROC(FSOUND_Record_GetDriverName, "_FSOUND_Record_GetDriverName@4"); + F_GETPROC(FSOUND_Record_GetDriver, "_FSOUND_Record_GetDriver@0"); + F_GETPROC(FSOUND_Record_StartSample, "_FSOUND_Record_StartSample@8"); + F_GETPROC(FSOUND_Record_Stop, "_FSOUND_Record_Stop@0"); + F_GETPROC(FSOUND_Record_GetPosition, "_FSOUND_Record_GetPosition@0"); + F_GETPROC(FSOUND_File_SetCallbacks, "_FSOUND_File_SetCallbacks@20"); + F_GETPROC(FMUSIC_LoadSong, "_FMUSIC_LoadSong@4"); + F_GETPROC(FMUSIC_LoadSongEx, "_FMUSIC_LoadSongEx@24"); + F_GETPROC(FMUSIC_GetOpenState, "_FMUSIC_GetOpenState@4"); + F_GETPROC(FMUSIC_FreeSong, "_FMUSIC_FreeSong@4"); + F_GETPROC(FMUSIC_PlaySong, "_FMUSIC_PlaySong@4"); + F_GETPROC(FMUSIC_StopSong, "_FMUSIC_StopSong@4"); + F_GETPROC(FMUSIC_StopAllSongs, "_FMUSIC_StopAllSongs@0"); + F_GETPROC(FMUSIC_SetZxxCallback, "_FMUSIC_SetZxxCallback@8"); + F_GETPROC(FMUSIC_SetRowCallback, "_FMUSIC_SetRowCallback@12"); + F_GETPROC(FMUSIC_SetOrderCallback, "_FMUSIC_SetOrderCallback@12"); + F_GETPROC(FMUSIC_SetInstCallback, "_FMUSIC_SetInstCallback@12"); + F_GETPROC(FMUSIC_SetSample, "_FMUSIC_SetSample@12"); + F_GETPROC(FMUSIC_SetUserData, "_FMUSIC_SetUserData@8"); + F_GETPROC(FMUSIC_OptimizeChannels, "_FMUSIC_OptimizeChannels@12"); + F_GETPROC(FMUSIC_SetReverb, "_FMUSIC_SetReverb@4"); + F_GETPROC(FMUSIC_SetLooping, "_FMUSIC_SetLooping@8"); + F_GETPROC(FMUSIC_SetOrder, "_FMUSIC_SetOrder@8"); + F_GETPROC(FMUSIC_SetPaused, "_FMUSIC_SetPaused@8"); + F_GETPROC(FMUSIC_SetMasterVolume, "_FMUSIC_SetMasterVolume@8"); + F_GETPROC(FMUSIC_SetMasterSpeed, "_FMUSIC_SetMasterSpeed@8"); + F_GETPROC(FMUSIC_SetPanSeperation, "_FMUSIC_SetPanSeperation@8"); + F_GETPROC(FMUSIC_GetName, "_FMUSIC_GetName@4"); + F_GETPROC(FMUSIC_GetType, "_FMUSIC_GetType@4"); + F_GETPROC(FMUSIC_GetNumOrders, "_FMUSIC_GetNumOrders@4"); + F_GETPROC(FMUSIC_GetNumPatterns, "_FMUSIC_GetNumPatterns@4"); + F_GETPROC(FMUSIC_GetNumInstruments, "_FMUSIC_GetNumInstruments@4"); + F_GETPROC(FMUSIC_GetNumSamples, "_FMUSIC_GetNumSamples@4"); + F_GETPROC(FMUSIC_GetNumChannels, "_FMUSIC_GetNumChannels@4"); + F_GETPROC(FMUSIC_GetSample, "_FMUSIC_GetSample@8"); + F_GETPROC(FMUSIC_GetPatternLength, "_FMUSIC_GetPatternLength@8"); + F_GETPROC(FMUSIC_IsFinished, "_FMUSIC_IsFinished@4"); + F_GETPROC(FMUSIC_IsPlaying, "_FMUSIC_IsPlaying@4"); + F_GETPROC(FMUSIC_GetMasterVolume, "_FMUSIC_GetMasterVolume@4"); + F_GETPROC(FMUSIC_GetGlobalVolume, "_FMUSIC_GetGlobalVolume@4"); + F_GETPROC(FMUSIC_GetOrder, "_FMUSIC_GetOrder@4"); + F_GETPROC(FMUSIC_GetPattern, "_FMUSIC_GetPattern@4"); + F_GETPROC(FMUSIC_GetSpeed, "_FMUSIC_GetSpeed@4"); + F_GETPROC(FMUSIC_GetBPM, "_FMUSIC_GetBPM@4"); + F_GETPROC(FMUSIC_GetRow, "_FMUSIC_GetRow@4"); + F_GETPROC(FMUSIC_GetPaused, "_FMUSIC_GetPaused@4"); + F_GETPROC(FMUSIC_GetTime, "_FMUSIC_GetTime@4"); + F_GETPROC(FMUSIC_GetRealChannel, "_FMUSIC_GetRealChannel@8"); + F_GETPROC(FMUSIC_GetUserData, "_FMUSIC_GetUserData@4"); return instance; } -void FMOD_FreeInstance(FMOD_INSTANCE *instance) +static void FMOD_FreeInstance(FMOD_INSTANCE *instance) { if (instance) { if (instance->module) { - FreeLibrary(instance->module); +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) + FreeLibrary((HMODULE)instance->module); +#else + dlclose(instance->module); +#endif } free(instance); } } #endif + diff --git a/Toshi/vendor/fmod/include/wincompat.h b/Toshi/vendor/fmod/include/wincompat.h new file mode 100644 index 0000000..3bdbc4f --- /dev/null +++ b/Toshi/vendor/fmod/include/wincompat.h @@ -0,0 +1,81 @@ +#if !defined(WINCOMPAT_INCLUDED) && !defined(PLATFORM_WINDOWS) && !defined(WIN32) && !defined(WINDOWS) && !defined(__WIN32__) +#define WINCOMPAT_INCLUDED + +/** + * + * Author: Magnus Naeslund (mag@fbab.net, mag@bahnhof.se) + * (c) 2000 Magnus Naeslund, all rights reserved + * + */ + +#include +#include +#include +#include +#include +#include + +#ifndef TRUE + #define TRUE 1 +#endif +#ifndef FALSE + #define FALSE 0 +#endif + +#define _kbhit kbhit +#define stricmp strcasecmp +#define strnicmp strncasecmp + +#define Sleep(x) usleep((x)*1000) + +static int inited=0; +static struct termios ori; + +static void tcatexit(){ + tcsetattr(0,0,&ori); +} + +static void init_terminal(){ + struct termios t; + tcgetattr(0,&t); + tcgetattr(0,&ori); + t.c_lflag &= ~(ICANON); + tcsetattr(0,0,&t); + atexit(tcatexit); +} + +static inline int kbhit(){ + fd_set rfds; + struct timeval tv; + + if (!inited){ + inited=1; + init_terminal(); + } + + FD_ZERO(&rfds); + FD_SET(0, &rfds); + tv.tv_sec = 0; + tv.tv_usec = 10*1000; + return select(1, &rfds, NULL, NULL, &tv)>0; +} + +static inline int getch(){ + fd_set rfds; + + if (!inited){ + inited=1; + init_terminal(); + } + + FD_ZERO(&rfds); + FD_SET(0, &rfds); + if (select(1, &rfds, NULL, NULL, NULL)>0) + return getchar(); + else{ + printf("wincompat.h: select() on fd 0 failed\n"); + return 0xDeadBeef; + } +} + +#endif diff --git a/Toshi/vendor/fmod/lib/fmod.dll b/Toshi/vendor/fmod/lib/fmod.dll index 60eeacf..6b0e379 100644 Binary files a/Toshi/vendor/fmod/lib/fmod.dll and b/Toshi/vendor/fmod/lib/fmod.dll differ diff --git a/Toshi/vendor/fmod/lib/fmod64.dll b/Toshi/vendor/fmod/lib/fmod64.dll new file mode 100644 index 0000000..2a8bab2 Binary files /dev/null and b/Toshi/vendor/fmod/lib/fmod64.dll differ diff --git a/Toshi/vendor/fmod/lib/fmod64vc.lib b/Toshi/vendor/fmod/lib/fmod64vc.lib new file mode 100644 index 0000000..f0369df Binary files /dev/null and b/Toshi/vendor/fmod/lib/fmod64vc.lib differ diff --git a/Toshi/vendor/fmod/lib/fmodbc.lib b/Toshi/vendor/fmod/lib/fmodbc.lib new file mode 100644 index 0000000..0b0399b Binary files /dev/null and b/Toshi/vendor/fmod/lib/fmodbc.lib differ diff --git a/Toshi/vendor/fmod/lib/fmodlcc.lib b/Toshi/vendor/fmod/lib/fmodlcc.lib new file mode 100644 index 0000000..0738c0a Binary files /dev/null and b/Toshi/vendor/fmod/lib/fmodlcc.lib differ diff --git a/Toshi/vendor/fmod/lib/fmodvc.lib b/Toshi/vendor/fmod/lib/fmodvc.lib index e37f9e1..b3c9fd9 100644 Binary files a/Toshi/vendor/fmod/lib/fmodvc.lib and b/Toshi/vendor/fmod/lib/fmodvc.lib differ diff --git a/Toshi/vendor/fmod/lib/fmodwc.lib b/Toshi/vendor/fmod/lib/fmodwc.lib new file mode 100644 index 0000000..12fe755 Binary files /dev/null and b/Toshi/vendor/fmod/lib/fmodwc.lib differ diff --git a/Toshi/vendor/fmod/lib/libfmod.a b/Toshi/vendor/fmod/lib/libfmod.a new file mode 100644 index 0000000..cf2aadf Binary files /dev/null and b/Toshi/vendor/fmod/lib/libfmod.a differ