HulaLoop
Simple cross-platform audio loopback and recording.
Public Member Functions | Static Public Member Functions | List of all members
hula::LinuxAudio Class Reference
Inheritance diagram for hula::LinuxAudio:
Inheritance graph
[legend]
Collaboration diagram for hula::LinuxAudio:
Collaboration graph
[legend]

Public Member Functions

 LinuxAudio ()
 Construct a new instance of LinuxAudio.
 
 ~LinuxAudio ()
 Destructor for LinuxAudio.
 
void capture ()
 Capture loop for LinuxAudio.
 
std::vector< Device * > getDevices (DeviceType type)
 Fetch devices of the specified type. More...
 
bool checkRates (Device *device)
 Check with the hardware to ensure that the current audio settings are valid for the selected device. More...
 
void setActiveOutputDevice (Device *device)
 DEPRECATED: To be replaced by OSAudio::setActiveOutputDevice.
 
- Public Member Functions inherited from hula::OSAudio
virtual ~OSAudio ()=0
 Virtual implementation of Destructor.
 
void setBufferSize (uint32_t size)
 Set the desired capture buffer size. More...
 
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...
 
void copyToBuffers (const void *data, uint32_t bytes)
 Write to each of the buffers contained in rbs.
 
void setActiveInputDevice (Device *device)
 Set the selected input device and restart capture threads with new device. More...
 
void setActiveOutputDevice (Device *device)
 Set the selected output device and restart capture threads with new device. More...
 

Static Public Member Functions

static void startPAVUControl ()
 Open the program Pulse Audio Volume Control to the Record tab. More...
 
- Static Public Member Functions inherited from hula::OSAudio
static void backgroundCapture (OSAudio *_this)
 Static function to allow starting a thread with an instance's capture method. More...
 

Additional Inherited Members

- Protected Member Functions inherited from hula::OSAudio
 OSAudio ()
 Constructor is protected since this class is abstract.
 
- Protected Attributes inherited from hula::OSAudio
DeviceactiveInputDevice
 The selected input device.
 
DeviceactiveOutputDevice
 The selected output device.
 
std::vector< HulaRingBuffer * > rbs
 List of all added ring buffers. More...
 
std::vector< std::thread > inThreads
 Thread for input device activities.
 
std::vector< std::thread > outThreads
 Thread for output device activities.
 
std::atomic< bool > endCapture
 Flag to syncronize the capture thread for an instance. More...
 
uint32_t captureBufferSize
 I don't really know what this is for right now but I'm going to add this comment so that Doxygen will quit complaining. More...
 

Member Function Documentation

bool LinuxAudio::checkRates ( Device device)
virtual

Check with the hardware to ensure that the current audio settings are valid for the selected device.

Parameters
deviceDevice to check against

Implements hula::OSAudio.

std::vector< Device * > LinuxAudio::getDevices ( DeviceType  type)
virtual

Fetch devices of the specified type.

These devices must be deleted by the caller using the Device::deleteDevices() method.

The list is designed for one-time use. Get the list, use the device, delete the list immediately.

DO NOT STORE THIS as it may become out-of-date.

Returns
List of Device objects

Implements hula::OSAudio.

void LinuxAudio::startPAVUControl ( )
static

Open the program Pulse Audio Volume Control to the Record tab.

This will allow the user to select the "Monitor of" source that they wish to capture loopback from.


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