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

#include <AudioCache.h>

Public Types

enum  FileFormat { UNKNOWN, OGG, MP3 }
 

Public Member Functions

 AudioCache ()
 
 ~AudioCache ()
 
void addCallbacks (const std::function< void()> &callback)
 
 AudioCache ()
 
 AudioCache (const AudioCache &)
 
 ~AudioCache ()
 
void addCallbacks (const std::function< void()> &callback)
 

Protected Member Functions

void readDataTask ()
 
void invokingCallbacks ()
 
void readDataTask ()
 
void invokingCallbacks ()
 

Protected Attributes

ALsizei _dataSize
 
ALenum _format
 
ALsizei _sampleRate
 
float _duration
 
int _bytesPerFrame
 
AudioStreamBasicDescription outputFormat
 
ALuint _alBufferId
 
char * _pcmData
 
SInt64 _bytesOfRead
 
char * _queBuffers [QUEUEBUFFER_NUM]
 
ALsizei _queBufferSize [QUEUEBUFFER_NUM]
 
UInt32 _queBufferFrames
 
UInt32 _queBufferBytes
 
bool _alBufferReady
 
std::mutex _callbackMutex
 
std::vector< std::function
< void()> > 
_callbacks
 
std::mutex _readDataTaskMutex
 
bool _exitReadDataTask
 
std::string _fileFullPath
 
FileFormat _fileFormat
 
size_t _pcmDataSize
 
ALenum _alBufferFormat
 
int _channels
 
ALuint _sampleRate
 
size_t _bytesPerFrame
 
void * _pcmData
 
size_t _bytesOfRead
 
int _queBufferFrames
 
int _queBufferBytes
 
int _mp3Encoding
 

Friends

class AudioEngineImpl
 
class AudioPlayer
 

Member Enumeration Documentation

enum FileFormat
strong
Enumerator
UNKNOWN 
OGG 
MP3 

Constructor & Destructor Documentation

~AudioCache ( )
AudioCache ( const AudioCache )
~AudioCache ( )

Member Function Documentation

void addCallbacks ( const std::function< void()> &  callback)
void addCallbacks ( const std::function< void()> &  callback)
void invokingCallbacks ( )
protected
void invokingCallbacks ( )
protected
void readDataTask ( )
protected
void readDataTask ( )
protected

Friends And Related Function Documentation

AudioPlayer
friend

Member Data Documentation

ALenum _alBufferFormat
protected
ALuint _alBufferId
protected
bool _alBufferReady
protected
SInt64 _bytesOfRead
protected
size_t _bytesOfRead
protected
int _bytesPerFrame
protected
size_t _bytesPerFrame
protected
std::mutex _callbackMutex
protected
std::vector< std::function< void()> > _callbacks
protected
int _channels
protected
ALsizei _dataSize
protected
float _duration
protected
bool _exitReadDataTask
protected
FileFormat _fileFormat
protected
std::string _fileFullPath
protected
ALenum _format
protected
int _mp3Encoding
protected
char* _pcmData
protected
void* _pcmData
protected
size_t _pcmDataSize
protected
UInt32 _queBufferBytes
protected
int _queBufferBytes
protected
UInt32 _queBufferFrames
protected
int _queBufferFrames
protected
char * _queBuffers
protected
ALsizei _queBufferSize
protected
std::mutex _readDataTaskMutex
protected
ALsizei _sampleRate
protected
ALuint _sampleRate
protected
AudioStreamBasicDescription outputFormat
protected

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