You.i Engine
CYIAudioStream Class Referenceabstract

Detailed Description

Base audio stream class that can process raw audio PCM.

This class can be inherited to process any kind of audio. To start processing audio, it needs to be registered to the CYIAudioEngine.

#include <audio/YiAudioStream.h>

Inheritance diagram for CYIAudioStream:

Public Member Functions

 CYIAudioStream ()
 
virtual ~CYIAudioStream ()
 
virtual bool Process (CYIAudioEngine *pAudioEngine, float *pData, uint32_t uFrameCount)=0
 

Friends

class CYIAudioEngine
 

Constructor & Destructor Documentation

CYIAudioStream::CYIAudioStream ( )
virtual CYIAudioStream::~CYIAudioStream ( )
virtual

Member Function Documentation

virtual bool CYIAudioStream::Process ( CYIAudioEngine pAudioEngine,
float *  pData,
uint32_t  uFrameCount 
)
pure virtual

Called by the CYIAudioEngine to process an audio buffer. pData is an array of size uFrameCount * CYIAudioEngine::GetChannelCount(). Each sample in pData is ranged from -1 to 1.

New samples processes by this callback should be added to pData, not overriden. It is cumulative for all active CYIAudioStream instances. To start processing, this stream needs to be registered to the CYIAudioEngine. Unregister to stop processing.

Note
This is called from the audio thread.

Implemented in CYISoundInstance.

Friends And Related Function Documentation

friend class CYIAudioEngine
friend

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