HulaLoop
Simple cross-platform audio loopback and recording.
Public Member Functions | Static Public Member Functions | List of all members
OSXAudio Class Reference

A audio class that captures system wide audio on OSX. More...

#include <OSXAudio.h>

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

Public Member Functions

 OSXAudio ()
 Constructs an instance of OSXAudio class.
 
virtual ~OSXAudio ()
 Deconstructs the OSXAudio instance.
 
void capture ()
 Execution loop for loopback capture.
 
vector< Device * > getInputDevices ()
 Fetch all PortAudio devices that are eligible for recording. More...
 
vector< Device * > getOutputDevices ()
 Fetch all PortAudio devices that are eligible for playback.
 
void setActiveOutputDevice (Device *device)
 Set the selected output device and restart capture threads with new device. More...
 
- Public Member Functions inherited from OSAudio
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...
 
void setActiveRecordDevice (Device *device)
 Set the selected input device and restart capture threads with new device. More...
 

Static Public Member Functions

static void test_capture (OSXAudio *param)
 Static function in the current instance of the class to allow thread execution. More...
 

Additional Inherited Members

- Protected Attributes inherited from OSAudio
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

A audio class that captures system wide audio on OSX.

Member Function Documentation

vector< Device * > OSXAudio::getInputDevices ( )
virtual

Fetch all PortAudio devices that are eligible for recording.

In our case, this includes all output devices since we want to do loopback.

Implements OSAudio.

void OSXAudio::setActiveOutputDevice ( Device device)
virtual

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

Parameters
deviceInstance of Device that corresponds to the desired system device

Implements OSAudio.

void OSXAudio::test_capture ( OSXAudio param)
static

Static function in the current instance of the class to allow thread execution.

Parameters
_thisInstance of the current object

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