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

📄 soundengine.h

📁 在iPhone OS上使用用Objective-C语言开发的Demo程序
💻 H
📖 第 1 页 / 共 2 页
字号:
    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_UnloadBackgroundMusicTrack();/*!    @function       SoundEngine_StartBackgroundMusic    @abstract       Tells the background music player to start playing.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_StartBackgroundMusic();/*!    @function       SoundEngine_StopBackgroundMusic    @abstract       Tells the background music player to stop playing.    @param          inAddToQueue                        If true, playback will stop when all tracks have completed. If false, playback						will stop immediately.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_StopBackgroundMusic(Boolean inStopAtEnd);/*!    @function       SoundEngine_SetBackgroundMusicVolume    @abstract       Sets the volume for the background music player    @param          inValue                        A Float32 that represents the level. The range is between 0.0 and 1.0 (inclusive).    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_SetBackgroundMusicVolume(Float32 inValue);/*!    @function       SoundEngine_LoadLoopingEffect    @abstract       Loads a sound effect from a file and return an ID to refer to that effect. Note: The files						MUST all be in the same data format and sample rate    @param          inLoopFilePath                        The absolute path to the file to load. This is the file that will loop continually.    @param          inAttackFilePath                        The absolute path to the file to load. This will play once at the start of the effect.						Set to NULL if no attack is desired, looping file will play immediately.    @param          inDecayFilePath                        The absolute path to the file to load. This will play once after looping has been ended. 						Triggered using SoundEngine_StopEffect with the inDoDecay set to true. Set to NULL if no						decay is desired, looping file will stop immediately. 	@param			outEffectID						A UInt32 ID that refers to the effect.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_LoadLoopingEffect(const char* inLoopFilePath, const char* inAttackFilePath, const char* inDecayFilePath, UInt32* outEffectID);/*!    @function       SoundEngine_LoadEffect    @abstract       Loads a sound effect from a file and return an ID to refer to that effect.    @param          inPath                        The absolute path to the file to load.	@param			outEffectID						A UInt32 ID that refers to the effect.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_LoadEffect(const char* inPath, UInt32* outEffectID);/*!    @function       SoundEngine_UnloadEffect    @abstract       Releases all resources associated with the given effect ID    @param          inEffectID                        The ID of the effect to unload.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_UnloadEffect(UInt32 inEffectID);/*!    @function       SoundEngine_StartEffect    @abstract       Starts playback of an effect    @param          inEffectID                        The ID of the effect to start.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_StartEffect(UInt32 inEffectID);/*!    @function       SoundEngine_StopEffect    @abstract       Stops playback of an effect    @param          inEffectID                        The ID of the effect to stop.    @param          inDoDecay                        Whether to play the decay file or stop immmediately (this is ignored						for non-looping effects)    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_StopEffect(UInt32 inEffectID, Boolean inDoDecay);/*!    @function       SoundEngine_Vibrate    @abstract       Tells the device to vibrate*/#if TARGET_OS_IPHONE	#define SoundEngine_Vibrate() AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)#endif/*!    @function       SoundEngine_SetEffectPitch    @abstract       Applies pitch shifting to an effect    @param          inEffectID                        The ID of the effect to adjust    @param          inValue                        A Float32 that represents the pitch scalar, with 1.0 being unchanged. Must 						be greater than 0.    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_SetEffectPitch(UInt32 inEffectID, Float32 inValue);/*!    @function       SoundEngine_SetEffectVolume    @abstract       Sets the volume for an effect    @param          inEffectID                        The ID of the effect to adjust    @param          inValue                        A Float32 that represents the level. The range is between 0.0 and 1.0 (inclusive).    @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_SetEffectLevel(UInt32 inEffectID, Float32 inValue);/*!    @function       SoundEngine_SetEffectPosition    @abstract       Tells the engine whether a given effect should loop when played or if it should					play through just once and stop.    @param          inEffectID                        The ID of the effect to adjust    @param          inX                        A Float32 that represents the effect's position along the X axis. Maximum distance						is 100000.0 (absolute, not per axis), reference distance (distance from which gain 						begins to attenuate) is 1.0    @param          inY                        A Float32 that represents the effect's position along the Y axis. Maximum distance						is 100000.0 (absolute, not per axis), reference distance (distance from which gain 						begins to attenuate) is 1.0	@param          inZ                        A Float32 that represents the effect's position along the Z axis. Maximum distance						is 100000.0 by default (absolute, not per axis), reference distance (distance from 						which gain begins to attenuate) is 1.0	@result         A OSStatus indicating success or failure.*/OSStatus	SoundEngine_SetEffectPosition(UInt32 inEffectID, Float32 inX, Float32 inY, Float32 inZ);/*!   @function       SoundEngine_SetEffectsVolume   @abstract       Sets the overall volume for the effects   @param          inValue                       A Float32 that represents the level. The range is between 0.0 and 1.0 (inclusive).   @result         A OSStatus indicating success or failure.*/OSStatus  SoundEngine_SetEffectsVolume(Float32 inValue);/*!   @function       SoundEngine_SetMaxDistance   @abstract       Sets the maximum distance for effect attenuation. Gain will attenuate between the				   reference distance and the maximum distance, after which gain will be 0.0   @param          inValue                       A Float32 that represents the level. Must be greater than 0.0.   @result         A OSStatus indicating success or failure.*/OSStatus	SoundEngine_SetMaxDistance(Float32 inValue);/*!   @function       SoundEngine_SetReferenceDistance   @abstract       Sets the distance at which effect gain attenuation begins. It will attenuate between				   the reference distance and the maximum distance. Sounds closer than the reference				   distance will have no attenuation applied   @param          inValue                       A Float32 that represents the level. Must be greater than 0.0.   @result         A OSStatus indicating success or failure.*/OSStatus	SoundEngine_SetReferenceDistance(Float32 inValue);#if defined(__cplusplus)}#endif#endif

⌨️ 快捷键说明

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