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

#include <cSoundObject.h>

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

Public Member Functions

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
 
virtual size_t get_WaveDataLength () override
 
virtual const void * get_WaveData () override
 
virtual const cWaveFormatExget_WaveFormat () 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

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 blob of audio/wave data loaded into memory. (on demand?) may be PCM or compressed. m_wf Use this cAVSink with cWaveFileReader or cMP3FileReader to read in audio files.

Member Function Documentation

◆ get_WaveData()

virtual const void* GrayLib::cSoundObject::get_WaveData ( )
inlineoverridevirtual

ISoundObject

Reimplemented in GrayLib::cSoundFile.

◆ get_WaveDataLength()

virtual size_t GrayLib::cSoundObject::get_WaveDataLength ( )
inlineoverridevirtual

ISoundObject

Reimplemented in GrayLib::cSoundFile.

◆ get_WaveFormat()

virtual const cWaveFormatEx* GrayLib::cSoundObject::get_WaveFormat ( )
inlineoverridevirtual

ISoundObject

Reimplemented in GrayLib::cSoundFile.

◆ isSoundLoaded()

bool GrayLib::cSoundObject::isSoundLoaded ( ) const
inlinenoexcept

◆ LoadSoundFile()

HRESULT GrayLib::cSoundObject::LoadSoundFile ( const FILECHAR_t pszFilePath)

Load all the sound data into memory.

◆ LoadSoundMP3()

HRESULT GrayLib::cSoundObject::LoadSoundMP3 ( cStreamInput stmIn)

Load MP3 file. MIME_EXT_mp3

◆ LoadSoundWAV()

HRESULT GrayLib::cSoundObject::LoadSoundWAV ( cStreamInput stmIn)

Load WAV file. MIME_EXT_wav

◆ OnFrame()

HRESULT GrayLib::cSoundObject::OnFrame ( const cAVHeaderFrame head,
const void *  pData,
size_t  nSizeData 
)
overridevirtual

cAVSink Get a chunk of sound data.

Reimplemented from GrayLib::cAVSink.

◆ OnHeaderStream()

HRESULT GrayLib::cSoundObject::OnHeaderStream ( const cAVHeaderStream head,
const void *  pForm,
size_t  nSizeForm 
)
overridevirtual

cAVSink Get the sound data format information.

Reimplemented from GrayLib::cAVSink.

◆ UnloadSoundObject()

void GrayLib::cSoundObject::UnloadSoundObject ( )
inline

Member Data Documentation

◆ m_Data

cHeapBlock GrayLib::cSoundObject::m_Data

Read the full contents into memory as one block. PCM or compressed blocks.

◆ m_wf

cWaveFormat GrayLib::cSoundObject::m_wf

Sound/Wave format info.


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