CrystalSpace::SoundCyclicBuffer Class Reference
An implementation of a cyclic buffer oriented for sound functionality. More...
#include <csplugincommon/sndsys/cyclicbuf.h>
Public Member Functions | |
void | AddBytes (void *bytes_ptr, size_t bytes_length) |
Add bytes to the cyclic buffer. | |
void | AdvanceStartValue (size_t advance_amount) |
Advance the first byte pointer of the cyclic buffer so that data below this value can be overwritten. | |
void | Clear (long value=0) |
Clear the buffer and reset the start and end values to the provided value. | |
void | GetDataPointersFromPosition (size_t *position_value, size_t max_length, uint8 **buffer1, size_t *buffer1_length, uint8 **buffer2, size_t *buffer2_length) |
Get data pointers to copy data out of the cyclic buffer. | |
size_t | GetEndValue () |
The positional value associated with one byte beyond the last byte in the buffer. | |
size_t | GetFreeBytes () |
Return the number of free bytes in the cyclic buffer. | |
size_t | GetLength () |
Get the buffer length of the cyclic buffer in bytes. | |
size_t | GetStartValue () |
The positional value associated with the first byte of data in the buffer. | |
SoundCyclicBuffer (size_t buffer_size) | |
Construct the cycling buffer with a specific maximum storage size. |
Detailed Description
An implementation of a cyclic buffer oriented for sound functionality.
Definition at line 32 of file cyclicbuf.h.
Constructor & Destructor Documentation
|
Construct the cycling buffer with a specific maximum storage size.
|
Member Function Documentation
|
Add bytes to the cyclic buffer. The bytes must fit. Use GetFreeBytes() to check for available space and AdvanceStartValue() to make more space available. |
|
Advance the first byte pointer of the cyclic buffer so that data below this value can be overwritten.
|
|
Clear the buffer and reset the start and end values to the provided value.
|
|
Get data pointers to copy data out of the cyclic buffer.
|
|
The positional value associated with one byte beyond the last byte in the buffer.
|
|
Return the number of free bytes in the cyclic buffer.
|
|
Get the buffer length of the cyclic buffer in bytes.
Definition at line 79 of file cyclicbuf.h. |
|
The positional value associated with the first byte of data in the buffer.
|
The documentation for this class was generated from the following file:
- csplugincommon/sndsys/cyclicbuf.h
Generated for Crystal Space by doxygen 1.4.6