11 #include "HulaRingBuffer.h" 21 void joinAndKillThreads(std::vector<std::thread> &threads);
48 std::vector<HulaRingBuffer *>
rbs;
93 virtual std::vector<Device *>
getDevices(DeviceType type) = 0;
111 #endif // END HL_OS_AUDIO_H Abstract class that defines the required components for OS specfic audio classes. ...
Definition: OSAudio.h:19
std::vector< HulaRingBuffer * > rbs
List of all added ring buffers.
Definition: OSAudio.h:48
std::vector< std::thread > inThreads
Thread for input device activities.
Definition: OSAudio.h:53
OSAudio()
Constructor is protected since this class is abstract.
Definition: OSAudio.h:28
void setBufferSize(uint32_t size)
Set the desired capture buffer size.
Definition: OSAudio.cpp:14
virtual void capture()=0
Execution loop for loopback capture.
std::vector< std::thread > outThreads
Thread for output device activities.
Definition: OSAudio.h:58
Device * activeOutputDevice
The selected output device.
Definition: OSAudio.h:42
void setActiveOutputDevice(Device *device)
Set the selected output device and restart capture threads with new device.
Definition: OSAudio.cpp:183
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...
Definition: OSAudio.h:75
void copyToBuffers(const void *data, uint32_t bytes)
Write to each of the buffers contained in rbs.
Definition: OSAudio.cpp:72
HulaLoop wrapper class for PortAudio ring buffer.
Definition: HulaRingBuffer.h:86
void setActiveInputDevice(Device *device)
Set the selected input device and restart capture threads with new device.
Definition: OSAudio.cpp:129
void addBuffer(HulaRingBuffer *rb)
Add an initialized buffer to the list of buffers that receive audio data.
Definition: OSAudio.cpp:25
Wrapper for OS specific device information.
Definition: Device.h:34
Definition: Controller.h:11
void removeBuffer(HulaRingBuffer *rb)
Remove a buffer from the list of buffers that receive audio data.
Definition: OSAudio.cpp:52
static void backgroundCapture(OSAudio *_this)
Static function to allow starting a thread with an instance's capture method.
Definition: OSAudio.cpp:95
std::atomic< bool > endCapture
Flag to syncronize the capture thread for an instance.
Definition: OSAudio.h:67
virtual std::vector< Device * > getDevices(DeviceType type)=0
Receive the list of available record, playback and/or loopback audio devices connected to the OS and ...
virtual bool checkRates(Device *device)=0
Verify the bit rate of set rate with the hardware device compatibility.
virtual ~OSAudio()=0
Virtual implementation of Destructor.
Definition: OSAudio.cpp:194
Device * activeInputDevice
The selected input device.
Definition: OSAudio.h:32