cocos2d-x  2.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCComAudio Class Reference

#include <CCComAudio.h>

Inheritance diagram for CCComAudio:
CCComponent CCObject CCCopying

Public Member Functions

virtual bool init ()
virtual void onEnter ()
virtual void onExit ()
virtual bool isEnabled () const
virtual void setEnabled (bool b)
void end ()
void preloadBackgroundMusic (const char *pszFilePath)
void playBackgroundMusic (const char *pszFilePath, bool bLoop)
void playBackgroundMusic (const char *pszFilePath)
void stopBackgroundMusic (bool bReleaseData)
void stopBackgroundMusic ()
void pauseBackgroundMusic ()
void resumeBackgroundMusic ()
void rewindBackgroundMusic ()
bool willPlayBackgroundMusic ()
bool isBackgroundMusicPlaying ()
float getBackgroundMusicVolume ()
void setBackgroundMusicVolume (float volume)
float getEffectsVolume ()
void setEffectsVolume (float volume)
unsigned int playEffect (const char *pszFilePath, bool bLoop)
unsigned int playEffect (const char *pszFilePath)
void pauseEffect (unsigned int nSoundId)
void pauseAllEffects ()
void resumeEffect (unsigned int nSoundId)
void resumeAllEffects ()
void stopEffect (unsigned int nSoundId)
void stopAllEffects ()
void preloadEffect (const char *pszFilePath)
void unloadEffect (const char *pszFilePath)
void setFile (const char *pszFilePath)
const char * getFile ()
void setLoop (bool bLoop)
bool isLoop ()
- Public Member Functions inherited from CCComponent
virtual ~CCComponent (void)
virtual void update (float delta)
var update ( var delta)
local update ( local delta)
virtual void serialize (void *r)
local serialize ( local r)
virtual CCNodegetNode ()
virtual void setNode (CCNode *pNode)
local setNode ( local pNode)
const char * getName () const
var getName ()
local getName ()
void setName (const char *pName)
void setOwner (CCNode *pOwner)
CCNodegetOwner () const
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

Static Public Member Functions

static CCComAudiocreate (void)
- Static Public Member Functions inherited from CCComponent
static CCComponentcreate (void)
var create ()
local create ()

Protected Member Functions

 CCComAudio (void)
virtual ~CCComAudio (void)
- Protected Member Functions inherited from CCComponent
 CCComponent (void)

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID
- Protected Attributes inherited from CCComponent
std::string m_strName
var m_strName
local m_strName
bool m_bEnabled

Constructor & Destructor Documentation

CCComAudio ( void  )
virtual ~CCComAudio ( void  )

Member Function Documentation

static CCComAudio* create ( void  )
void end ( )
float getBackgroundMusicVolume ( )
float getEffectsVolume ( )
const char* getFile ( )
virtual bool init ( )

Reimplemented from CCComponent.

bool isBackgroundMusicPlaying ( )
virtual bool isEnabled ( ) const

Reimplemented from CCComponent.

bool isLoop ( )
virtual void onEnter ( )

Reimplemented from CCComponent.

virtual void onExit ( )

Reimplemented from CCComponent.

void pauseAllEffects ( )
void pauseBackgroundMusic ( )
void pauseEffect ( unsigned int  nSoundId)
void playBackgroundMusic ( const char *  pszFilePath,
bool  bLoop 
void playBackgroundMusic ( const char *  pszFilePath)
unsigned int playEffect ( const char *  pszFilePath,
bool  bLoop 
unsigned int playEffect ( const char *  pszFilePath)
void preloadBackgroundMusic ( const char *  pszFilePath)
void preloadEffect ( const char *  pszFilePath)
void resumeAllEffects ( )
void resumeBackgroundMusic ( )
void resumeEffect ( unsigned int  nSoundId)
void rewindBackgroundMusic ( )
void setBackgroundMusicVolume ( float  volume)
void setEffectsVolume ( float  volume)
virtual void setEnabled ( bool  b)

Reimplemented from CCComponent.

void setFile ( const char *  pszFilePath)
void setLoop ( bool  bLoop)
void stopAllEffects ( )
void stopBackgroundMusic ( bool  bReleaseData)
void stopBackgroundMusic ( )
void stopEffect ( unsigned int  nSoundId)
void unloadEffect ( const char *  pszFilePath)
bool willPlayBackgroundMusic ( )

The documentation for this class was generated from the following file: