cocos2d-x 3.0
- 首页 - 相关页面 - 模块 - 命名空间 - - 文件 -
Public 成员函数 - 图1 Public 成员函数 - 图2)
- 类列表 - 类索引 - 类继承关系 - 类成员

全部)) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义)))

Public 成员函数 | 静态 Public 成员函数 | 所有成员列表

FmodAudioPlayer类 参考

#include

类 FmodAudioPlayer 继承关系图:

Public 成员函数 - 图3 AudioPlayer

## Public 成员函数
FmodAudioPlayer ()
virtual ~FmodAudioPlayer ()
virtual void close ()
virtual void preloadBackgroundMusic (const char pszFilePath)
Preload background music. 更多…
virtual void playBackgroundMusic (const char pszFilePath, bool bLoop)
Play background music. 更多…
virtual void stopBackgroundMusic (bool bReleaseData)
Stop playing background music. 更多…
virtual void pauseBackgroundMusic ()
Pause playing background music. 更多…
virtual void resumeBackgroundMusic ()
Resume playing background music. 更多…
virtual void rewindBackgroundMusic ()
Rewind playing background music. 更多…
virtual bool willPlayBackgroundMusic ()
virtual bool isBackgroundMusicPlaying ()
Whether the background music is playing. 更多…
virtual float getBackgroundMusicVolume ()
The volume of the background music max value is 1.0,the min value is 0.0. 更多…
virtual void setBackgroundMusicVolume (float volume)
set the volume of background music 更多…
virtual float getEffectsVolume ()
The volume of the effects max value is 1.0,the min value is 0.0. 更多…
virtual void setEffectsVolume (float volume)
set the volume of sound effecs 更多…
virtual unsigned int playEffect (const char pszFilePath, bool bLoop, float pitch, float pan, float gain)
Play sound effect. 更多…
virtual void stopEffect (unsigned int nSoundId)
Stop playing sound effect. 更多…
virtual void preloadEffect (const char pszFilePath)
preload a compressed audio file 更多…
virtual void unloadEffect (const char *pszFilePath)
unload the preloaded effect from internal buffer 更多…
virtual void pauseEffect (unsigned int uSoundId)
pause an effect identified by sound id 更多…
virtual void pauseAllEffects ()
pause all playing effects 更多…
virtual void resumeEffect (unsigned int uSoundId)
resume an effect identified by sound id 更多…
virtual void resumeAllEffects ()
resume a effect identified by sound id 更多…
virtual void stopAllEffects ()
stop all playing effects 更多…
## 静态 Public 成员函数
static FmodAudioPlayer * sharedPlayer ()

构造及析构函数说明

FmodAudioPlayer ( )

virtual ~FmodAudioPlayer ( )

virtual

成员函数说明

virtual void close ( )

virtual

实现了 AudioPlayer.

virtual float getBackgroundMusicVolume ( )

virtual

The volume of the background music max value is 1.0,the min value is 0.0.

实现了 AudioPlayer.

virtual float getEffectsVolume ( )

virtual

The volume of the effects max value is 1.0,the min value is 0.0.

实现了 AudioPlayer.

virtual bool isBackgroundMusicPlaying ( )

virtual

Whether the background music is playing.

  • 返回
  • If is playing return true,or return false

实现了 AudioPlayer.

virtual void pauseAllEffects ( )

virtual

pause all playing effects

实现了 AudioPlayer.

virtual void pauseBackgroundMusic ( )

virtual

Pause playing background music.

实现了 AudioPlayer.

virtual void pauseEffect ( unsigned int uSoundId)

virtual

pause an effect identified by sound id

  • 参数
  • [in]uSoundIdsound id

实现了 AudioPlayer.

virtual void playBackgroundMusic ( const char * pszFilePath,
bool bLoop
)

virtual

Play background music.

  • 参数
  • pszFilePathThe path of the background music file,or the FileName of T_SoundResInfo bLoopWhether the background music loop or not

实现了 AudioPlayer.

virtual unsigned int playEffect ( const char * pszFilePath,
bool bLoop,
float pitch,
float pan,
float gain
)

virtual

Play sound effect.

  • 参数
  • pszFilePathThe path of the effect file,or the FileName of T_SoundResInfo Whether to loop the effect playing, default value is false

实现了 AudioPlayer.

virtual void preloadBackgroundMusic ( const char * pszFilePath)

virtual

Preload background music.

  • 参数
  • pszFilePathThe path of the background music file,or the FileName of T_SoundResInfo

实现了 AudioPlayer.

virtual void preloadEffect ( const char * pszFilePath)

virtual

preload a compressed audio file

the compressed audio will be decode to wave, then write into an internal buffer in SimpleaudioEngine

实现了 AudioPlayer.

virtual void resumeAllEffects ( )

virtual

resume a effect identified by sound id

实现了 AudioPlayer.

virtual void resumeBackgroundMusic ( )

virtual

Resume playing background music.

实现了 AudioPlayer.

virtual void resumeEffect ( unsigned int uSoundId)

virtual

resume an effect identified by sound id

  • 参数
  • [in]uSoundIdsound id

实现了 AudioPlayer.

virtual void rewindBackgroundMusic ( )

virtual

Rewind playing background music.

实现了 AudioPlayer.

virtual void setBackgroundMusicVolume ( float volume)

virtual

set the volume of background music

  • 参数
  • volumemust be in 0.0~1.0

实现了 AudioPlayer.

virtual void setEffectsVolume ( float volume)

virtual

set the volume of sound effecs

  • 参数
  • volumemust be in 0.0~1.0

实现了 AudioPlayer.

static FmodAudioPlayer* sharedPlayer ( )

static

virtual void stopAllEffects ( )

virtual

stop all playing effects

实现了 AudioPlayer.

virtual void stopBackgroundMusic ( bool bReleaseData)

virtual

Stop playing background music.

  • 参数
  • bReleaseDataIf release the background music data or not.As default value is false

实现了 AudioPlayer.

virtual void stopEffect ( unsigned int nSoundId)

virtual

Stop playing sound effect.

  • 参数
  • nSoundIdThe return value of function playEffect

实现了 AudioPlayer.

virtual void unloadEffect ( const char * pszFilePath)

virtual

unload the preloaded effect from internal buffer

  • 参数
  • [in]pszFilePathThe path of the effect file,or the FileName of T_SoundResInfo

实现了 AudioPlayer.

virtual bool willPlayBackgroundMusic ( )

virtual

实现了 AudioPlayer.


该类的文档由以下文件生成: