⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fmod.h

📁 一个小飞机游戏
💻 H
📖 第 1 页 / 共 3 页
字号:
{
    FSOUND_ENVIRONMENT_GENERIC,
    FSOUND_ENVIRONMENT_PADDEDCELL,
    FSOUND_ENVIRONMENT_ROOM,
    FSOUND_ENVIRONMENT_BATHROOM,
    FSOUND_ENVIRONMENT_LIVINGROOM,
    FSOUND_ENVIRONMENT_STONEROOM,
    FSOUND_ENVIRONMENT_AUDITORIUM,
    FSOUND_ENVIRONMENT_CONCERTHALL,
    FSOUND_ENVIRONMENT_CAVE,
    FSOUND_ENVIRONMENT_ARENA,
    FSOUND_ENVIRONMENT_HANGAR,
    FSOUND_ENVIRONMENT_CARPETEDHALLWAY,
    FSOUND_ENVIRONMENT_HALLWAY,
    FSOUND_ENVIRONMENT_STONECORRIDOR,
    FSOUND_ENVIRONMENT_ALLEY,
    FSOUND_ENVIRONMENT_FOREST,
    FSOUND_ENVIRONMENT_CITY,
    FSOUND_ENVIRONMENT_MOUNTAINS,
    FSOUND_ENVIRONMENT_QUARRY,
    FSOUND_ENVIRONMENT_PLAIN,
    FSOUND_ENVIRONMENT_PARKINGLOT,
    FSOUND_ENVIRONMENT_SEWERPIPE,
    FSOUND_ENVIRONMENT_UNDERWATER,
    FSOUND_ENVIRONMENT_DRUGGED,
    FSOUND_ENVIRONMENT_DIZZY,
    FSOUND_ENVIRONMENT_PSYCHOTIC,

    FSOUND_ENVIRONMENT_COUNT
};

/*
[DEFINE_START] 
[
 	[NAME] 
	FSOUND_REVERBMIX_USEDISTANCE
	
	[DESCRIPTION]	
	Used with FSOUND_Reverb_SetMix, this setting allows reverb to attenuate based on distance from the listener.
	Instead of hard coding a value with FSOUND_Reverb_SetMix, this value can be used instead, for a more natural
	reverb dropoff.

	[SEE_ALSO]
	FSOUND_Reverb_SetMix
]
*/
#define FSOUND_REVERBMIX_USEDISTANCE	-1.0f	/* used with FSOUND_Reverb_SetMix to scale reverb by distance */
/* [DEFINE_END] */


/*
[DEFINE_START] 
[
 	[NAME] 
	FSOUND_REVERB_IGNOREPARAM
	
	[DESCRIPTION]	
	Used with FSOUND_Reverb_SetEnvironment and FSOUND_Reverb_SetEnvironmentAdvanced, this can
	be placed in the place of a specific parameter for the reverb setting.  It allows you to 
	not set any parameters except the ones you are interested in .. and example would be this.
	FSOUND_Reverb_SetEnvironment(FSOUND_REVERB_IGNOREPARAM,
								 FSOUND_REVERB_IGNOREPARAM,
								 FSOUND_REVERB_IGNOREPARAM,  
								 0.0f);
	This means env, vol and decay are left alone, but damp is set to 0.

	[SEE_ALSO]
	FSOUND_Reverb_SetEnvironment
	FSOUND_Reverb_SetEnvironmentAdvanced
]
*/
#define FSOUND_REVERB_IGNOREPARAM	-9999999	/* used with FSOUND_Reverb_SetEnvironmentAdvanced to ignore certain parameters by choice. */
/* [DEFINE_END] */


/*
[DEFINE_START] 
[
 	[NAME] 
	FSOUND_REVERB_PRESETS
	
	[DESCRIPTION]	
	A set of predefined environment PARAMETERS, created by Creative Labs
	These can be placed directly into the FSOUND_Reverb_SetEnvironment call

	[SEE_ALSO]
	FSOUND_Reverb_SetEnvironment
]
*/
#define FSOUND_PRESET_OFF			  FSOUND_ENVIRONMENT_GENERIC,0.0f,0.0f,0.0f
#define FSOUND_PRESET_GENERIC         FSOUND_ENVIRONMENT_GENERIC,0.5f,1.493f,0.5f
#define FSOUND_PRESET_PADDEDCELL      FSOUND_ENVIRONMENT_PADDEDCELL,0.25f,0.1f,0.0f
#define FSOUND_PRESET_ROOM            FSOUND_ENVIRONMENT_ROOM,0.417f,0.4f,0.666f
#define FSOUND_PRESET_BATHROOM        FSOUND_ENVIRONMENT_BATHROOM,0.653f,1.499f,0.166f
#define FSOUND_PRESET_LIVINGROOM      FSOUND_ENVIRONMENT_LIVINGROOM,0.208f,0.478f,0.0f
#define FSOUND_PRESET_STONEROOM       FSOUND_ENVIRONMENT_STONEROOM,0.5f,2.309f,0.888f
#define FSOUND_PRESET_AUDITORIUM      FSOUND_ENVIRONMENT_AUDITORIUM,0.403f,4.279f,0.5f
#define FSOUND_PRESET_CONCERTHALL     FSOUND_ENVIRONMENT_CONCERTHALL,0.5f,3.961f,0.5f
#define FSOUND_PRESET_CAVE            FSOUND_ENVIRONMENT_CAVE,0.5f,2.886f,1.304f
#define FSOUND_PRESET_ARENA           FSOUND_ENVIRONMENT_ARENA,0.361f,7.284f,0.332f
#define FSOUND_PRESET_HANGAR          FSOUND_ENVIRONMENT_HANGAR,0.5f,10.0f,0.3f
#define FSOUND_PRESET_CARPETEDHALLWAY FSOUND_ENVIRONMENT_CARPETEDHALLWAY,0.153f,0.259f,2.0f
#define FSOUND_PRESET_HALLWAY         FSOUND_ENVIRONMENT_HALLWAY,0.361f,1.493f,0.0f
#define FSOUND_PRESET_STONECORRIDOR   FSOUND_ENVIRONMENT_STONECORRIDOR,0.444f,2.697f,0.638f
#define FSOUND_PRESET_ALLEY           FSOUND_ENVIRONMENT_ALLEY,0.25f,1.752f,0.776f
#define FSOUND_PRESET_FOREST          FSOUND_ENVIRONMENT_FOREST,0.111f,3.145f,0.472f
#define FSOUND_PRESET_CITY            FSOUND_ENVIRONMENT_CITY,0.111f,2.767f,0.224f
#define FSOUND_PRESET_MOUNTAINS       FSOUND_ENVIRONMENT_MOUNTAINS,0.194f,7.841f,0.472f
#define FSOUND_PRESET_QUARRY          FSOUND_ENVIRONMENT_QUARRY,1.0f,1.499f,0.5f
#define FSOUND_PRESET_PLAIN           FSOUND_ENVIRONMENT_PLAIN,0.097f,2.767f,0.224f
#define FSOUND_PRESET_PARKINGLOT      FSOUND_ENVIRONMENT_PARKINGLOT,0.208f,1.652f,1.5f
#define FSOUND_PRESET_SEWERPIPE       FSOUND_ENVIRONMENT_SEWERPIPE,0.652f,2.886f,0.25f
#define FSOUND_PRESET_UNDERWATER      FSOUND_ENVIRONMENT_UNDERWATER,1.0f,1.499f,0.0f
#define FSOUND_PRESET_DRUGGED         FSOUND_ENVIRONMENT_DRUGGED,0.875f, 8.392f,1.388f
#define FSOUND_PRESET_DIZZY           FSOUND_ENVIRONMENT_DIZZY,0.139f,17.234f,0.666f
#define FSOUND_PRESET_PSYCHOTIC       FSOUND_ENVIRONMENT_PSYCHOTIC,0.486f,7.563f,0.806f
/* [DEFINE_END] */


/*
[DEFINE_START] 
[
 	[NAME] 
	FSOUND_GEOMETRY_MODES
	
	[DESCRIPTION]	
	Geometry flags, used as the mode flag in FSOUND_Geometry_AddPolygon

	[SEE_ALSO]
	FSOUND_Geometry_AddPolygon
]
*/
#define FSOUND_GEOMETRY_NORMAL				0x00	/* Default geometry type.  Occluding polygon */
#define FSOUND_GEOMETRY_REFLECTIVE			0x01	/* This polygon is reflective */
#define FSOUND_GEOMETRY_OPENING				0x02	/* Overlays a transparency over the previous polygon.  The openingfactor value supplied is copied internally. */
#define FSOUND_GEOMETRY_OPENING_REFERENCE	0x04	/* Overlays a transparency over the previous polygon.  The openingfactor supplied is pointed to (for access when building a list) */
/* [DEFINE_END] */


/*
[DEFINE_START] 
[
 	[NAME] 
	FSOUND_FX_MODES
	
	[DESCRIPTION]
    These flags are used with FSOUND_FX_Enable to enable or disable DirectX 8 FX for a channel.

	[SEE_ALSO]
    FSOUND_FX_Enable
    FSOUND_FX_SetChorus
    FSOUND_FX_SetCompressor
    FSOUND_FX_SetDistortion
    FSOUND_FX_SetEcho
    FSOUND_FX_SetFlanger
    FSOUND_FX_SetGargle
    FSOUND_FX_SetI3DL2Reverb
    FSOUND_FX_SetParamEQ
    FSOUND_FX_SetWavesReverb
]
*/
#define FSOUND_FX_CHORUS                    0x001
#define FSOUND_FX_COMPRESSOR                0x002
#define FSOUND_FX_DISTORTION                0x004
#define FSOUND_FX_ECHO                      0x008
#define FSOUND_FX_FLANGER                   0x010
#define FSOUND_FX_GARGLE                    0x020
#define FSOUND_FX_I3DL2REVERB               0x040
#define FSOUND_FX_PARAMEQ                   0x080
#define FSOUND_FX_WAVES_REVERB              0x100
/* [DEFINE_END] */


/*
[ENUM]
[
	[DESCRIPTION]	
	These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
    Note that this only works with FSOUND_OUTPUT_DSOUND output mode.

	[SEE_ALSO]		
    FSOUND_SetSpeakerMode
]
*/
enum FSOUND_SPEAKERMODES
{
    FSOUND_SPEAKERMODE_5POINT1,       /* The audio is played through a speaker arrangement of surround speakers with a subwoofer. */
    FSOUND_SPEAKERMODE_HEADPHONE,     /* 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. */
};


/*
[DEFINE_START] 
[
 	[NAME] 
	FSOUND_INIT_FLAGS
	
	[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.
    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

	[SEE_ALSO]
	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_END] */




/* ========================================================================================== */
/* FUNCTION PROTOTYPES                                                                        */
/* ========================================================================================== */

#ifdef __cplusplus
extern "C" {
#endif

/* ================================== */
/* Initialization / Global functions. */
/* ================================== */

/* 
    PRE - FSOUND_Init functions. These can't be called after FSOUND_Init is 
    called (they will fail). They set up FMOD system functionality. 
*/
DLL_API signed char		F_API FSOUND_SetOutput(int outputtype);
DLL_API signed char		F_API FSOUND_SetDriver(int driver);
DLL_API signed char		F_API FSOUND_SetMixer(int mixer);
DLL_API signed char		F_API FSOUND_SetBufferSize(int len_ms);
DLL_API signed char		F_API FSOUND_SetHWND(void *hwnd);
DLL_API	signed char		F_API FSOUND_SetMinHardwareChannels(int min);
DLL_API	signed char		F_API FSOUND_SetMaxHardwareChannels(int max);

/* 
    Main initialization / closedown functions.
    Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override 
           with MIDI playback.
         : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter 
           which window is in focus.
*/
DLL_API signed char		F_API FSOUND_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
DLL_API void			F_API FSOUND_Close();

/* 
    Runtime system level functions 
*/
DLL_API void F_API FSOUND_SetSpeakerMode(unsigned int speakermode);
DLL_API void F_API FSOUND_SetSFXMasterVolume(int volume);
DLL_API void F_API FSOUND_SetPanSeperation(float pansep);
DLL_API void F_API FSOUND_File_SetCallbacks(
             unsigned int (_cdecl *OpenCallback)(const char *name),
             void         (_cdecl *CloseCallback)(unsigned int handle),
             int          (_cdecl *ReadCallback)(void *buffer, int size, unsigned int handle),
             int          (_cdecl *SeekCallback)(unsigned int handle, int pos, signed char mode),
             int          (_cdecl *TellCallback)(unsigned int handle));

/* 
    System information functions. 
*/
DLL_API int				F_API FSOUND_GetError();
DLL_API float			F_API FSOUND_GetVersion();
DLL_API int				F_API FSOUND_GetOutput();
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 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 int				F_API FSOUND_GetSFXMasterVolume();
DLL_API int				F_API FSOUND_GetNumHardwareChannels();
DLL_API int				F_API FSOUND_GetChannelsPlaying();
DLL_API float			F_API FSOUND_GetCPUUsage();

/* =================================== */
/* Sample management / load functions. */
/* =================================== */

/* 
    Sample creation and management functions
    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Sample_Load to load from memory.
           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, unsigned int mode, int memlength);
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);
DLL_API signed char		F_API FSOUND_Sample_Lock(FSOUND_SAMPLE *sptr, int offset, int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
DLL_API signed char		F_API FSOUND_Sample_Unlock(FSOUND_SAMPLE *sptr, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);

/*
    Sample control functions
*/

DLL_API signed char		F_API FSOUND_Sample_SetLoopMode(FSOUND_SAMPLE *sptr, unsigned int loopmode);
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_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min, float max);

/* 
    Sample information functions
*/

DLL_API FSOUND_SAMPLE * F_API FSOUND_Sample_Get(int sampno);
DLL_API 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 unsigned int	F_API FSOUND_Sample_GetMode(FSOUND_SAMPLE *sptr);
  
/* ============================ */
/* Channel control functions.   */
/* ============================ */

/* 
    Playing and stopping sounds.  
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -