Open Ephys GUI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions
DataBuffer Class Reference

Manages reading and writing data to a circular buffer. More...

#include <DataBuffer.h>

List of all members.

Public Member Functions

 DataBuffer (int chans, int size)
 ~DataBuffer ()
void clear ()
 Clears the buffer.
void addToBuffer (float *data, uint64 *ts, int16 *eventCodes, int numItems)
 Add an array of floats to the buffer.
int getNumSamples ()
 Returns the number of samples currently available in the buffer.
int readAllFromBuffer (AudioSampleBuffer &data, uint64 *ts, int16 *eventCodes, int maxSize)
 Copies as many samples as possible from the DataBuffer to an AudioSampleBuffer.

Detailed Description

Manages reading and writing data to a circular buffer.

See


Constructor & Destructor Documentation

DataBuffer::DataBuffer ( int  chans,
int  size 
)
DataBuffer::~DataBuffer ( )

Member Function Documentation

void DataBuffer::clear ( )

Clears the buffer.

void DataBuffer::addToBuffer ( float *  data,
uint64 *  ts,
int16 *  eventCodes,
int  numItems 
)

Add an array of floats to the buffer.

int DataBuffer::getNumSamples ( )

Returns the number of samples currently available in the buffer.

int DataBuffer::readAllFromBuffer ( AudioSampleBuffer &  data,
uint64 *  ts,
int16 *  eventCodes,
int  maxSize 
)

Copies as many samples as possible from the DataBuffer to an AudioSampleBuffer.


The documentation for this class was generated from the following file: