cocos2d-x  3.3
 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

 ComAudio (void)
 ctor More...
 
virtual ~ComAudio (void)
 NA NA More...
 
virtual bool init () override
 
virtual void onEnter () override
 NA NA More...
 
virtual void onExit () override
 NA NA More...
 
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)
 NA NA More...
 
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 ()
 NA NA More...
 

Static Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
- 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  )

ctor

virtual ~ComAudio ( void  )
virtual

NA NA

Member Function Documentation

static ComAudio* create ( 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

NA NA

Reimplemented from Component.

virtual void onExit ( )
overridevirtual

NA NA

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

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