![]() |
Skylicht Engine
|
Interface for a stream cursor, providing seek and read operations on an audio stream. More...
#include <Stream/IStream.h>
Public Types | |
| enum | EOrigin { OriginStart , OriginCurrent , OriginEnd } |
| Origin for seek operations. More... | |
Public Member Functions | |
| virtual int | seek (int pos, EOrigin origin)=0 |
| Move the cursor position. | |
| virtual int | tell ()=0 |
| Get current cursor position. | |
| virtual int | read (unsigned char *buff, int len)=0 |
| Read data from the stream. | |
| virtual bool | endOfStream ()=0 |
| Check if the cursor is at the end of the stream. | |
| virtual int | size ()=0 |
| Get total size of the stream. | |
| virtual bool | readyReadData (int len)=0 |
| Check if a certain amount of data is ready to be read. | |
| virtual void | trim () |
| Trim read data from the stream (used in dynamic streams). | |
Interface for a stream cursor, providing seek and read operations on an audio stream.
|
pure virtual |
Check if the cursor is at the end of the stream.
Implemented in Skylicht::Audio::CFileStreamCursor, Skylicht::Audio::CMemoryStreamCursor, Skylicht::Audio::COnlineMemoryStreamCursor, and Skylicht::CZipAudioFileStreamCursor.
|
pure virtual |
Read data from the stream.
| buff | Destination buffer |
| len | Number of bytes to read |
Implemented in Skylicht::Audio::CFileStreamCursor, Skylicht::Audio::CMemoryStreamCursor, Skylicht::Audio::COnlineMemoryStreamCursor, and Skylicht::CZipAudioFileStreamCursor.
|
pure virtual |
Check if a certain amount of data is ready to be read.
| len | Number of bytes to check |
Implemented in Skylicht::Audio::CFileStreamCursor, Skylicht::Audio::CMemoryStreamCursor, Skylicht::Audio::COnlineMemoryStreamCursor, and Skylicht::CZipAudioFileStreamCursor.
|
pure virtual |
Move the cursor position.
| pos | Offset in bytes |
| origin | Where to seek from |
Implemented in Skylicht::Audio::CFileStreamCursor, Skylicht::Audio::CMemoryStreamCursor, Skylicht::Audio::COnlineMemoryStreamCursor, and Skylicht::CZipAudioFileStreamCursor.
|
pure virtual |
Get total size of the stream.
Implemented in Skylicht::Audio::CFileStreamCursor, Skylicht::Audio::CMemoryStreamCursor, Skylicht::Audio::COnlineMemoryStreamCursor, and Skylicht::CZipAudioFileStreamCursor.
|
pure virtual |
Get current cursor position.
Implemented in Skylicht::Audio::CFileStreamCursor, Skylicht::Audio::CMemoryStreamCursor, Skylicht::Audio::COnlineMemoryStreamCursor, and Skylicht::CZipAudioFileStreamCursor.
|
inlinevirtual |
Trim read data from the stream (used in dynamic streams).
Reimplemented in Skylicht::Audio::COnlineMemoryStreamCursor.