Go to the documentation of this file.
38 #ifndef __RINGBUFFER_H__
39 #define __RINGBUFFER_H__
41 #include <QWaitCondition>
43 #include <QMutexLocker>
123 void underrunReset();
125 void overflowReset();
127 void debugDump()
const;
131 const int mTotalSize;
140 QWaitCondition mBufferIsNotFull;
141 QWaitCondition mBufferIsNotEmpty;
virtual void setUnderrunReadSlot(int8_t *ptrToReadSlot)
Sets the memory in the Read Slot when uderrun occurs. By default, this sets it to 0....
Definition: RingBuffer.cpp:204
void readSlotBlocking(int8_t *ptrToReadSlot)
Read a slot from the RingBuffer into ptrToReadSlot. This method will block until there's space in the...
Definition: RingBuffer.cpp:125
qint8 int8_t
Typedef for unsigned long long int. This type is guaranteed to be 64-bit.
Definition: jacktrip_types.h:78
virtual void setMemoryInReadSlotWithLastReadSlot(int8_t *ptrToReadSlot)
Uses the last read slot to set the memory in the Read Slot.
Definition: RingBuffer.cpp:211
void insertSlotBlocking(const int8_t *ptrToSlot)
Insert a slot into the RingBuffer from ptrToSlot. This method will block until there's space in the b...
Definition: RingBuffer.cpp:103
void readSlotNonBlocking(int8_t *ptrToReadSlot)
Same as readSlotBlocking but non-blocking (asynchronous)
Definition: RingBuffer.cpp:175
RingBuffer(int SlotSize, int NumSlots)
The class constructor.
Definition: RingBuffer.cpp:50
virtual ~RingBuffer()
The class destructor.
Definition: RingBuffer.cpp:93
void insertSlotNonBlocking(const int8_t *ptrToSlot)
Same as insertSlotBlocking but non-blocking (asynchronous)
Definition: RingBuffer.cpp:149
Provides a ring-buffer (or circular-buffer) that can be written to and read from asynchronously (bloc...
Definition: RingBuffer.h:57