Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
AudioFile Class Referenceabstract
Inheritance diagram for AudioFile:
AudioFileReader AudioFileWriter

Public Member Functions

size_t getLength () const
 
size_t getChannels () const
 
int getSampleRate () const
 

Protected Types

enum  Mode { kRead, kWrite }
 
enum  { kNumBufs = 2 }
 

Protected Member Functions

int setup (const std::string &path, size_t bufferSize, Mode mode, size_t channels=0, unsigned int sampleRate=0)
 
void scheduleIo ()
 
std::vector< float > & getRtBuffer ()
 
void threadLoop ()
 
virtual void io (std::vector< float > &buffer)=0
 

Protected Attributes

volatile size_t ioBuffer
 
size_t ioBufferOld
 
std::array< std::vector< float >
, kNumBufs > 
internalBuffers
 
std::thread diskIo
 
size_t size
 
volatile bool stop
 
bool ramOnly
 
size_t rtIdx
 
SNDFILE * sndfile = NULL
 
SF_INFO sfinfo = { 0 }
 

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