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

#include <AudioPlayer.h>

Public Member Functions

 AudioPlayer ()
 AudioPlayer ()
 ~AudioPlayer ()
bool init (SLEngineItf engineEngine, SLObjectItf outputMixObject, const std::string &fileFullPath, float volume, bool loop)
var init ( var engineEngine, var outputMixObject, var fileFullPath, var volume, var loop)
local init ( local engineEngine, local outputMixObject, local fileFullPath, local volume, local loop)
 AudioPlayer ()
 ~AudioPlayer ()
bool setTime (float time)
var setTime ( var time)
local setTime ( local time)
float getTime ()
var getTime ()
local getTime ()
bool setLoop (bool loop)
var setLoop ( var loop)
local setLoop ( local loop)
 AudioPlayer ()
 AudioPlayer (const AudioPlayer &)
 AudioPlayer ()
 AudioPlayer ()
 ~AudioPlayer ()
bool setTime (float time)
local setTime ( local time)
float getTime ()
bool setLoop (bool loop)
var setLoop ( var loop)
local setLoop ( local loop)

Public Attributes

bool _playOver
bool _loop
SLPlayItf _fdPlayerPlay

Protected Member Functions

void rotateBufferThread (int offsetFrame)
var rotateBufferThread ( var offsetFrame)
local rotateBufferThread ( local offsetFrame)
bool play2d (AudioCache *cache)
var play2d ( var cache)
local play2d ( local cache)
void rotateBufferThread (int offsetFrame)
var rotateBufferThread ( var offsetFrame)
local rotateBufferThread ( local offsetFrame)
bool play2d (AudioCache *cache)

Protected Attributes

AudioCache_audioCache
var _audioCache
local _audioCache
float _volume
std::function< void(int, const
std::string &)> 
_finishCallbak
bool _ready
ALuint _alSource
float _currTime
bool _streamingSource
ALuint _bufferIds [3]
std::thread _rotateBufferThread
std::condition_variable _sleepCondition
std::mutex _sleepMutex
bool _exitThread
bool _timeDirty

Friends

class AudioEngineImpl

Constructor & Destructor Documentation

var AudioPlayer ( )
local AudioPlayer ( )
var ~AudioPlayer ( )
local ~AudioPlayer ( )
var AudioPlayer ( )
local AudioPlayer ( )
var ~AudioPlayer ( )
local ~AudioPlayer ( )
var AudioPlayer ( )
local AudioPlayer ( )
AudioPlayer ( const AudioPlayer )
var AudioPlayer ( var  )
local AudioPlayer ( local  )
var ~AudioPlayer ( )
local ~AudioPlayer ( )

Member Function Documentation

float getTime ( )
inline
var getTime ( )
inline
local getTime ( )
inline
float getTime ( )
inline
var getTime ( )
inline
local getTime ( )
inline
bool init ( SLEngineItf  engineEngine,
SLObjectItf  outputMixObject,
const std::string &  fileFullPath,
float  volume,
bool  loop 
)
var init ( var  engineEngine,
var  outputMixObject,
var  fileFullPath,
var  volume,
var  loop 
)
local init ( local  engineEngine,
local  outputMixObject,
local  fileFullPath,
local  volume,
local  loop 
)
bool play2d ( AudioCache cache)
protected
var play2d ( var  cache)
protected
local play2d ( local  cache)
protected
bool play2d ( AudioCache cache)
protected
var play2d ( var  cache)
protected
local play2d ( local  cache)
protected
void rotateBufferThread ( int  offsetFrame)
protected
var rotateBufferThread ( var  offsetFrame)
protected
local rotateBufferThread ( local  offsetFrame)
protected
void rotateBufferThread ( int  offsetFrame)
protected
var rotateBufferThread ( var  offsetFrame)
protected
local rotateBufferThread ( local  offsetFrame)
protected
bool setLoop ( bool  loop)
var setLoop ( var  loop)
local setLoop ( local  loop)
bool setLoop ( bool  loop)
var setLoop ( var  loop)
local setLoop ( local  loop)
bool setTime ( float  time)
var setTime ( var  time)
local setTime ( local  time)
bool setTime ( float  time)
var setTime ( var  time)
local setTime ( local  time)

Friends And Related Function Documentation

var AudioEngineImpl
friend
local AudioEngineImpl
friend

Member Data Documentation

ALuint _alSource
protected
var _alSource
protected
local _alSource
protected
AudioCache * _audioCache
protected
var _audioCache
protected
local _audioCache
protected
ALuint _bufferIds
protected
var _bufferIds
protected
local _bufferIds
protected
float _currTime
protected
var _currTime
protected
local _currTime
protected
bool _exitThread
protected
var _exitThread
protected
local _exitThread
protected
SLPlayItf _fdPlayerPlay
var _fdPlayerPlay
local _fdPlayerPlay
std::function< void(int, const
std::string &)> _finishCallbak
protected
var _finishCallbak
protected
local _finishCallbak
protected
bool _loop
var _loop
local _loop
bool _playOver
var _playOver
local _playOver
bool _ready
protected
var _ready
protected
local _ready
protected
std::thread _rotateBufferThread
protected
var _rotateBufferThread
protected
local _rotateBufferThread
protected
std::condition_variable
_sleepCondition
protected
var _sleepCondition
protected
local _sleepCondition
protected
std::mutex _sleepMutex
protected
var _sleepMutex
protected
local _sleepMutex
protected
bool _streamingSource
protected
var _streamingSource
protected
local _streamingSource
protected
bool _timeDirty
protected
var _timeDirty
protected
local _timeDirty
protected
float _volume
protected
var _volume
protected
local _volume
protected

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