![]() |
HulaLoop
Simple cross-platform audio loopback and recording.
|
A quick start for getting HulaLoop'd audio into your application.
Incorporating HulaLoop into your application should be simple and easy.
To understand the simplest way to get started with HulaLoop, we'll break down the following example. See the Building HulaLoop page for help building and linking the library.
Create an instance of Controller. This is the main component in in the audio backend.
Fetch the device list, set the active device, and delete the allocated the devices.
Create a ring buffer and add it to the list of buffers that should receive audio data.
Since the loop (typically infinite), will block until the application terminates, start a thread with the "listen" routine.
Create a function that handles reading the ring buffer and processing the data.
A local buffer that data will be read into.
This loop would typically be infinite or rely on some flag to signal that capture should stop. For this example, we read a finite number of buffers as a proof of concept.
Read data from the ring buffer into our local buffer.
Clean up our local buffer.
1.8.11