Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSoundFile Class Reference

#include <cSoundFile.h>

Inheritance diagram for GrayLib::cSoundFile:
GrayLib::cSoundObject GrayLib::cAVSink GrayLib::cSoundFileObj

Public Member Functions

 cSoundFile (const FILECHAR_t *pszFilePath)
 
virtual ~cSoundFile ()
 
virtual HRESULT LoadResource ()
 
virtual size_t get_WaveDataLength () override
 
virtual const void * get_WaveData () override
 
virtual const cWaveFormatExget_WaveFormat () override
 
 UNITTEST_FRIEND (cSoundFile)
 
- Public Member Functions inherited from GrayLib::cSoundObject
bool isSoundLoaded () const noexcept
 
void UnloadSoundObject ()
 
virtual HRESULT OnHeaderStream (const cAVHeaderStream &head, const void *pForm, size_t nSizeForm) override
 
virtual HRESULT OnFrame (const cAVHeaderFrame &head, const void *pData, size_t nSizeData) override
 
HRESULT LoadSoundMP3 (cStreamInput &stmIn)
 
HRESULT LoadSoundWAV (cStreamInput &stmIn)
 
HRESULT LoadSoundFile (const FILECHAR_t *pszFilePath)
 
- Public Member Functions inherited from GrayLib::cAVSink
virtual ~cAVSink ()
 
virtual HRESULT OnHeaderOpen (const cAVHeader &head)
 
virtual HRESULT OnHeaderClose ()
 
virtual HRESULT OnClose ()
 

Public Attributes

cStringF m_sFilePath
 the file that contains the sound data. More...
 
- Public Attributes inherited from GrayLib::cSoundObject
cWaveFormat m_wf
 Sound/Wave format info. More...
 
cHeapBlock m_Data
 Read the full contents into memory as one block. PCM or compressed blocks. More...
 

Detailed Description

a generic sound file reader. Maybe from MIME_EXT_wav or MIME_EXT_mp3. Load on demand into memory for playing. cMP3FileReader or cWaveFileReader. User must handle IUNKNOWN_DISAMBIG(cRefBase)

Constructor & Destructor Documentation

◆ cSoundFile()

GrayLib::cSoundFile::cSoundFile ( const FILECHAR_t pszFilePath)

just store the name to load the data later on demand.

◆ ~cSoundFile()

GrayLib::cSoundFile::~cSoundFile ( )
virtual

Member Function Documentation

◆ get_WaveData()

const void * GrayLib::cSoundFile::get_WaveData ( )
overridevirtual

ISoundObject Lazy Load on demand.

Reimplemented from GrayLib::cSoundObject.

◆ get_WaveDataLength()

size_t GrayLib::cSoundFile::get_WaveDataLength ( )
overridevirtual

ISoundObject Lazy Load on demand.

Reimplemented from GrayLib::cSoundObject.

◆ get_WaveFormat()

const cWaveFormatEx * GrayLib::cSoundFile::get_WaveFormat ( )
overridevirtual

ISoundObject Lazy Load on demand.

Reimplemented from GrayLib::cSoundObject.

◆ LoadResource()

HRESULT GrayLib::cSoundFile::LoadResource ( )
virtual

Lazy Load all the sound data into memory on demand.

◆ UNITTEST_FRIEND()

GrayLib::cSoundFile::UNITTEST_FRIEND ( cSoundFile  )

Member Data Documentation

◆ m_sFilePath

cStringF GrayLib::cSoundFile::m_sFilePath

the file that contains the sound data.


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