Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Recorder Class Reference

Sound recorder. More...

#include <Recorder.h>

List of all members.

Public Member Functions

 Recorder (int channels=1, int frames=8192)
int channels () const
 Get number of recording channels.
int frames () const
 Get number of multi-channel recording frames.
int size () const
 Get total number of samples (frames x channels) in buffer.
void overwrite (float v, int chan)
 Write sample into ring buffer without advancing write tap.
void write (float v, int chan=0)
 Write sample into ring buffer and advance write tap.
void write (float v1, float v2, int chan=0)
int read (float *&buf)
 Empty buffer of most recent samples written from audio thread.
void resize (int chans, int frames)
 Resize buffers.

Detailed Description

Sound recorder.


Constructor & Destructor Documentation

Recorder ( int  channels = 1,
int  frames = 8192 
)
Parameters:
[in]chansnumber of channels
[in]framesnumber of (multi-)channel frames

Member Function Documentation

int read ( float *&  buf)

Empty buffer of most recent samples written from audio thread.

Returns number of frames copied to buffer. If the number of frames returned is 0, then no samples were read and 'buf' is unmodified. This should be called from a lower priority thread.

void resize ( int  chans,
int  frames 
)

Resize buffers.

Parameters:
[in]chansnumber of channels
[in]framesnumber of (multi-)channel frames
void write ( float  v1,
float  v2,
int  chan = 0 
)

Write samples into ring buffer and advance write tap Call this from the audio thread


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