Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::Audio::CMemoryStream Class Reference

Audio stream that reads from a memory buffer. More...

#include <Stream/CMemoryStream.h>

Inheritance diagram for Skylicht::Audio::CMemoryStream:
Skylicht::Audio::IStream

Public Member Functions

 CMemoryStream (unsigned char *buffer, int size, bool takeOwnership=false)
virtual IStreamCursorcreateCursor ()
 Create a new memory cursor.
Public Member Functions inherited from Skylicht::Audio::IStream
virtual void grab ()
 Increment reference count.
virtual bool drop ()
 Decrement reference count and delete if zero.
int getSampleRate ()
 Get expected sample rate (for recorder/procedural streams).
int getChannels ()
 Get number of channels (for recorder/procedural streams).
void setStreamAudio (int sampleRate, int channels)
 Set stream audio properties.
virtual void uploadData (unsigned char *buffer, int size)
 Upload new data to the stream (used in online/dynamic streams).
virtual void stopStream ()
 Stop the stream and clear buffers.

Protected Attributes

unsigned char * m_buffer
int m_size
bool m_takeOwnership
Protected Attributes inherited from Skylicht::Audio::IStream
int m_referenceCount
int m_sampleRate
int m_channels

Detailed Description

Audio stream that reads from a memory buffer.

Member Function Documentation

◆ createCursor()

virtual IStreamCursor * Skylicht::Audio::CMemoryStream::createCursor ( )
virtual

Create a new memory cursor.

Returns
Pointer to CMemoryStreamCursor

Implements Skylicht::Audio::IStream.


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