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>

Public Member Functions | |
| CYIAudioStream () | |
| virtual | ~CYIAudioStream () |
| virtual bool | Process (CYIAudioEngine *pAudioEngine, float *pData, uint32_t uFrameCount)=0 |
Friends | |
| class | CYIAudioEngine |
| CYIAudioStream::CYIAudioStream | ( | ) |
|
virtual |
|
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.
Implemented in CYISoundInstance.
|
friend |