HulaLoop
Simple cross-platform audio loopback and recording.
Public Member Functions | Protected Attributes | List of all members
OSAudio Class Referenceabstract

An abstract class that defines the components of the particular OS specfic classes. More...

#include <OSAudio.h>

Inheritance diagram for OSAudio:
Inheritance graph
[legend]
Collaboration diagram for OSAudio:
Collaboration graph
[legend]

Public Member Functions

virtual ~OSAudio ()=0
 Virtual implementation of Destructor.
 
void setBufferSize (uint32_t size)
 Set the desired capture buffer size. More...
 
void addBufferReadyCallback (ICallback *c)
 Add upper layer functions to the callback list. More...
 
void removeBufferReadyCallback (ICallback *func)
 Remove upper layer functions to the callback list. More...
 
virtual vector< Device * > getInputDevices ()=0
 Receive the list of available output audio devices connected to the OS and return them as Device instances. More...
 
virtual vector< Device * > getOutputDevices ()=0
 Set the selected output device and restart capture threads with new device. More...
 
virtual void capture ()=0
 Execution loop for loopback capture.
 
void setActiveRecordDevice (Device *device)
 Set the selected input device and restart capture threads with new device. More...
 
virtual void setActiveOutputDevice (Device *device)=0
 

Protected Attributes

DeviceactiveInputDevice
 The selected input device.
 
DeviceactiveOutputDevice
 The selected output device.
 
vector< ICallback * > callbackList
 List of all added callback function.
 
vector< thread > execThreads
 List of all running threads.
 
uint32_t captureBufferSize
 

Detailed Description

An abstract class that defines the components of the particular OS specfic classes.

Member Function Documentation

void OSAudio::addBufferReadyCallback ( ICallback func)

Add upper layer functions to the callback list.

Parameters
funcDerived instance of ICallback class
virtual vector<Device*> OSAudio::getInputDevices ( )
pure virtual

Receive the list of available output audio devices connected to the OS and return them as Device instances.

Returns
vector of Device instances

Implemented in WindowsAudio, and OSXAudio.

virtual vector<Device*> OSAudio::getOutputDevices ( )
pure virtual

Set the selected output device and restart capture threads with new device.

Parameters
deviceInstance of Device that corresponds to the desired system device

Implemented in WindowsAudio, and OSXAudio.

void OSAudio::removeBufferReadyCallback ( ICallback callFunction)

Remove upper layer functions to the callback list.

Parameters
funcDerived instance of ICallback class
void OSAudio::setActiveRecordDevice ( Device device)

Set the selected input device and restart capture threads with new device.

Parameters
deviceInstance of Device that corresponds to the desired system device
void OSAudio::setBufferSize ( uint32_t  size)

Set the desired capture buffer size.

Parameters
sizeInteger value representing the desired buffer size

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