Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Module Reference

Noah Weninger edited this page Apr 19, 2018 · 2 revisions

How to read type signatures:
PortName :: InputType -> OutputType

Important definitions:

pub struct Frame {
    pub rate: f32,
    pub data: Array2<f32>, // axis 0 is time, axis 1 is channel
}

Audio IO


AudioIO

Input :: Frame -> usize
Output :: usize -> Frame

This module currently implements real time Audio IO via the JACK Audio Connection Kit on Linux. The usize types are currently just used as markers to signal when data is requested.

It writes out the value 1 to Input when it is ready to receive an input frame, which it will read when available and write to the JACK client. If the frame is not received within the buffer period, silence will instead be written out to JACK.

Upon Output receiving an arbitrary usize value, it will write a single frame when one becomes available. If no value is received before the buffer period expires, the frame will be dropped.

Clone this wiki locally