![]() ![]() ![]() All commands to change the config are send to the supervisor thread. ![]() The websocket server lauches a separate thread to handle each connected client. It's also responsible for updating the configuration when requested to do so via the websocket server or a SIGHUP signal. The requests for capture rate adjust are passed on to the capture thread. The supervisor monitors all threads by listening to their status messages. This is used to send requests for adjusting the capture speed to the supoervisor thread, on a separate message channel. The Alsa playback device supports monitoring the buffer level of the playback device. Once a message arrives, the audio data is converted to the right sample format for the device, and written to the playback device. The playback thread simply waits for audio messages to appear in the queue. Once all processing is done, the audio data is posted to the input queue of the playback device. Once a message arrives, it's passed through all the defined filters and mixers of the pipeline. The processing thread waits for audio chunk messages to arrive in the input queue. After this the capture thread returns to reading he next shunk of samples from the device. At the end, the chunk of samples is packed as a message that is then posted to the input queue of the processing thread. If resampling is enabled, the audio data is sent to the resampler. It then converts the samples to 64-bit floats (or optionally 32-bit). The capture thread reads a chunk samples from the audio device in the selected format. This chart shows the most important parts: There is also a supervisor thread for control. The processing queue waits for audio messages, processes them in the order they arrive, and passes the processed audio via another message queue to the playback thread. Each message consists of a chunk of audio with a configurable size. The capture thread passes audio to the processing thread via a message queue. ![]() One thread handles capturing audio, one handles the playback, and one does the processing in between. The audio pipeline in CamillaDSP runs in three separate threads.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |