|
AudioDataLib
A C++ library of classes supporting a variety of audio-data tasks.
|
This is stream that can be used to write bytes to any location in memory. More...
#include <ByteStream.h>
Public Member Functions | |
| WriteOnlyBufferStream (uint8_t *buffer, uint64_t bufferSize) | |
| virtual | ~WriteOnlyBufferStream () |
| virtual uint64_t | WriteBytesToStream (const uint8_t *buffer, uint64_t bufferSize) override |
| virtual uint64_t | ReadBytesFromStream (uint8_t *buffer, uint64_t bufferSize) override |
| virtual uint64_t | GetSize () const override |
| virtual bool | CanRead () override |
| virtual bool | CanWrite () override |
| uint64_t | GetWriteOffset () const |
| bool | SetWriteOffset (uint64_t readOffset) |
| const uint8_t * | GetBuffer () const |
| void | Reset () |
Public Member Functions inherited from AudioDataLib::ByteStream | |
| ByteStream () | |
| virtual | ~ByteStream () |
| virtual uint64_t | PeekBytesFromStream (uint8_t *buffer, uint64_t bufferSize) |
| template<typename T > | |
| bool | ReadType (T *value) |
| template<typename T > | |
| bool | WriteType (const T *value) |
Protected Attributes | |
| uint8_t * | writeOnlyBuffer |
| uint64_t | writeOnlyBufferSize |
| uint64_t | writeOffset |
This is stream that can be used to write bytes to any location in memory.
| WriteOnlyBufferStream::WriteOnlyBufferStream | ( | uint8_t * | buffer, |
| uint64_t | bufferSize ) |
|
virtual |
|
overridevirtual |
Indicate whether there is data available to be read from the stream.
Implements AudioDataLib::ByteStream.
|
overridevirtual |
Indicate whether it is possible to write additional data to the stream.
Implements AudioDataLib::ByteStream.
|
inline |
|
overridevirtual |
Return the amount of data (in bytes) currently stored in the stream.
Implements AudioDataLib::ByteStream.
|
inline |
|
overridevirtual |
Read from this stream into the given buffer.
| [out] | buffer | This is a pointer to an array where bytes read from the stream will be written. |
| [in] | bufferSize | This is the size in bytes of the given array. |
Implements AudioDataLib::ByteStream.
| void WriteOnlyBufferStream::Reset | ( | ) |
| bool AudioDataLib::WriteOnlyBufferStream::SetWriteOffset | ( | uint64_t | readOffset | ) |
|
overridevirtual |
Write the given buffer to this stream.
| [in] | buffer | This is a pointer to the array of bytes to write to the stream. |
| [in] | bufferSize | This is the size of the given array in bytes. |
Implements AudioDataLib::ByteStream.
|
protected |
|
protected |
|
protected |