#sink #oboe #flowgraph #audio #rust

aloe-oboe-flowgraph-sink

Rust crate for processing audio data in a flowgraph architecture with support for multiple sample formats including i16, i32, f32, and i24. This crate is a translation of the c++ juce module serving the same function.

1 unstable release

Uses new Rust 2024

new 0.1.1 Apr 3, 2025

#4 in #oboe


Used in 2 crates

GPL-3.0 license

69KB
446 lines

aloe-oboe-flowgraph-sink

Aloe Oboe Flowgraph Sink is a Rust crate designed to facilitate audio data consumption within a flowgraph processing architecture. The crate provides various audio sink structures for reading audio data, supporting multiple sample formats efficiently, thereby optimizing audio processing pipelines.

Overview

This crate features a series of FlowGraphSink structures, each equipped to handle varying data types:

  • FlowgraphSinkI16: Reads audio data as 16-bit signed integers.
  • FlowgraphSinkI32: Reads data as 32-bit signed integers.
  • FlowgraphSinkFloat: Consumes and processes 32-bit floating-point data.
  • FlowgraphSinkI24: Handles packed 24-bit signed integer data where each sample is 3 bytes.

Each type of sink is implemented over a base FlowGraphSink class that acts as the terminal node within a graph, employing FlowGraphPortFloatInput to seamlessly pull and process data.

Key Features

  • Versatile Formats: Supports multiple common audio data formats.
  • Graph-based Processing: Uses a pull-model to efficiently manage flowgraph execution, optimizing for real-time data handling.
  • Scalability: Designed to integrate seamlessly into larger audio processing frameworks.

Usage

Create an instance of a specific sink (e.g., FlowgraphSinkI16) with a designated channel count, then employ the read() function to pull frames from the graph:

let sink = FlowgraphSinkI16::new(2); // Stereo
let mut buffer: Vec<i16> = vec![0; buffer_size];
sink.read(buffer.as_mut_ptr() as *mut c_void, buffer_size);

Getting Started

To integrate Aloe Oboe Flowgraph Sink into your project, add the following to your Cargo.toml:

[dependencies]
aloe-oboe-flowgraph-sink = "0.1.0"

License

This project is licensed under the GPL-3.0 License.

Contribution

Contributions are welcome. Please fork the repository and submit a pull request.

Note: This README.md file was generated by an AI model and may not be 100% accurate, but it should be pretty good.

This crate is a translation of the JUCE module.

JUCE is a c++ software framework for developing high performance audio applications.

Usage falls under the GPLv3 as well as the JUCE commercial license.

See github.com/juce-framework/JUCE and the JUCE license page for details.

This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project.

Dependencies

~13–23MB
~378K SLoC