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

Central component of the audio backend. More...

#include <Controller.h>

Public Member Functions

 Controller ()
 Construct an instance of Controller class. More...
 
virtual ~Controller ()
 Deconstructs the current instance of the Controller class.
 
void addBuffer (HulaRingBuffer *rb)
 Add an initialized buffer to the list of buffers that receive audio data. More...
 
void removeBuffer (HulaRingBuffer *rb)
 Remove a buffer from the list of buffers that receive audio data. More...
 
HulaRingBuffercreateBuffer (float duration)
 Allocate and initialize a HulaRingBuffer that can be added to the OSAudio ring buffer list via Controller::addBuffer. More...
 
HulaRingBuffercreateAndAddBuffer (float duration)
 Allocate and initialize a HulaRingBuffer and automatically add it to the OSAudio ring buffer list.
 
std::vector< Device * > getDevices (DeviceType type) const
 Fetch a list of devices for the given DeviceType. More...
 
bool setActiveInputDevice (Device *device) const
 Set the device from which audio should be captured. More...
 
bool setActiveOutputDevice (Device *device) const
 Set the device to which audio should be played back. More...
 

Detailed Description

Central component of the audio backend.

A class that structures the receival of audio from the OS framework.

Constructor & Destructor Documentation

◆ Controller()

Controller::Controller ( )

Construct an instance of Controller class.

Acts as a bridge between the higher levels and OS level functions

Member Function Documentation

◆ addBuffer()

void Controller::addBuffer ( HulaRingBuffer rb)

Add an initialized buffer to the list of buffers that receive audio data.

As soon as the buffer is added, it should begin receiving data.

If already present, the ring buffer will not be duplicated.

This is a publicly exposed wrapper for the OSAudio method.

Parameters
rbHulaLoop ring buffer to add to the list

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