cocos2d-x  3.1rc0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ComAudio Class Reference

#include <CCComAudio.h>

Inheritance diagram for ComAudio:
Component Ref

Public Member Functions

virtual bool init () override
virtual void onEnter () override
virtual void onExit () override
virtual bool isEnabled () const override
virtual void setEnabled (bool b) override
virtual bool serialize (void *r) override
void end ()
void preloadBackgroundMusic (const char *pszFilePath)
void playBackgroundMusic (const char *pszFilePath, bool bLoop)
void playBackgroundMusic (const char *pszFilePath)
void playBackgroundMusic ()
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)
unsigned int playEffect ()
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 Component
virtual ~Component (void)
virtual void update (float delta)
const std::string & getName () const
void setName (const std::string &name)
void setOwner (Node *pOwner)
NodegetOwner () const
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

static cocos2d::RefcreateInstance (void)
static ComAudiocreate (void)
- Static Public Member Functions inherited from Component
static Componentcreate (void)

Static Public Attributes

static
cocostudio::ObjectFactory::TInfo 
Type

Protected Member Functions

 ComAudio (void)
virtual ~ComAudio (void)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Component
Node_owner
std::string _name
bool _enabled
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Constructor & Destructor Documentation

ComAudio ( void  )
protected
virtual ~ComAudio ( void  )
protectedvirtual

Member Function Documentation

static ComAudio* create ( void  )
static
static cocos2d::Ref* createInstance ( void  )
static
void end ( )
float getBackgroundMusicVolume ( )
float getEffectsVolume ( )
const char* getFile ( )
virtual bool init ( )
overridevirtual

Reimplemented from Component.

bool isBackgroundMusicPlaying ( )
virtual bool isEnabled ( ) const
overridevirtual

Reimplemented from Component.

bool isLoop ( )
virtual void onEnter ( )
overridevirtual

Reimplemented from Component.

virtual void onExit ( )
overridevirtual

Reimplemented from Component.

void pauseAllEffects ( )
void pauseBackgroundMusic ( )
void pauseEffect ( unsigned int  nSoundId)
void playBackgroundMusic ( const char *  pszFilePath,
bool  bLoop 
)
void playBackgroundMusic ( const char *  pszFilePath)
void playBackgroundMusic ( )
unsigned int playEffect ( const char *  pszFilePath,
bool  bLoop 
)
unsigned int playEffect ( const char *  pszFilePath)
unsigned int playEffect ( )
void preloadBackgroundMusic ( const char *  pszFilePath)
void preloadEffect ( const char *  pszFilePath)
void resumeAllEffects ( )
void resumeBackgroundMusic ( )
void resumeEffect ( unsigned int  nSoundId)
void rewindBackgroundMusic ( )
virtual bool serialize ( void *  r)
overridevirtual

Reimplemented from Component.

void setBackgroundMusicVolume ( float  volume)
void setEffectsVolume ( float  volume)
virtual void setEnabled ( bool  b)
overridevirtual

Reimplemented from Component.

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 ( )

Member Data Documentation


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