Interface to array-backed source buffers.
More...
#include <direct_array_buffer.h>
|
| virtual T * | getData () const =0 |
| | Function returns pointer to the internal buffer. More...
|
| |
| virtual size_t | getCapacity () const =0 |
| | Function returns buffer capacity in samples. More...
|
| |
| virtual size_t | getReadPos ()=0 |
| | Function returns current read position. More...
|
| |
| size_t | readSamples (T *samples, size_t samplesCount, bool incrementPosition=true) override |
| | Function reads the samples from buffer. More...
|
| |
| virtual size_t | readSamplesAt (T *samples, size_t samplesCount, bool incrementPosition=true, size_t readOffset=0) |
| | Function reads the samples from buffer. More...
|
| |
| virtual std::recursive_mutex & | getLock ()=0 |
| | Function return locking object. More...
|
| |
| virtual size_t | getSize ()=0 |
| | Function returns current buffer size in samples. More...
|
| |
| virtual void | incrementReadPosition (size_t pos)=0 |
| | Function increments read position for N samples. More...
|
| |
|
| virtual size_t | read (T *samples, size_t samplesCount, size_t pos) |
| | Implements read from buffer. More...
|
| |
| virtual size_t | read (T *samples, size_t samplesCount) |
| | Function read from buffer from current location. More...
|
| |
template<typename T, typename Locking = UseLock>
class IDirectArraySourceBuffer< T, Locking >
Interface to array-backed source buffers.
◆ getCapacity()
template<typename T, typename Locking = UseLock>
Function returns buffer capacity in samples.
- Returns
- Capacity in samples.
Implemented in FifoBufferBase< T >.
◆ getData()
template<typename T, typename Locking = UseLock>
Function returns pointer to the internal buffer.
- Returns
- Pointer to the first sample in the buffer.
Implemented in DiskBuffer< T >, and FifoBuffer< T >.
◆ getReadPos()
template<typename T, typename Locking = UseLock>
◆ read() [1/2]
template<typename T, typename Locking = UseLock>
Implements read from buffer.
- Parameters
-
| samples | a pointer to the first sample. |
| samplesCount | a number of samples to be read. |
| pos | read location. |
- Returns
- Number of read samples.
Reimplemented in DiskBuffer< T >.
◆ read() [2/2]
template<typename T, typename Locking = UseLock>
Function read from buffer from current location.
- Parameters
-
| samples | a pointer to the first sample. |
| samplesCount | a number of samples to be read. |
- Returns
- Number of read samples.
◆ readSamples()
template<typename T, typename Locking = UseLock>
Function reads the samples from buffer.
- Parameters
-
| samples | a pointer to the first sample |
| samplesCount | a number of samples to be read |
| incrementPosition | an option if change position |
- Returns
- number of read samples
Implements ISourceBuffer< T >.
◆ readSamplesAt()
template<typename T, typename Locking = UseLock>
| virtual size_t IDirectArraySourceBuffer< T, Locking >::readSamplesAt |
( |
T * |
samples, |
|
|
size_t |
samplesCount, |
|
|
bool |
incrementPosition = true, |
|
|
size_t |
readOffset = 0 |
|
) |
| |
|
inlinevirtual |
Function reads the samples from buffer.
- Parameters
-
| samples | a pointer to the first sample |
| samplesCount | a number of samples to be read |
| incrementPosition | an option if change position |
| readOffset | reading position offset |
- Returns
- number of read samples
The documentation for this class was generated from the following file: