6 releases

0.1.4 Jan 15, 2022
0.0.3 Jan 13, 2021

#507 in Audio

Download history 8/week @ 2024-02-26 106/week @ 2024-04-01

106 downloads per month
Used in minidsp-daemon

Apache-2.0 and LGPL-3.0

17K SLoC

This crate provides a high level API for accessing and configuring a MiniDSP device. To get started, start by instantiating the right transport. If the device is locally connected via USB, use transport::hid::HidTransport. If using the WI-DG or connecting to an instance of this program running the server component, see transport::net::StreamTransport.

use anyhow::Result;
use futures::StreamExt;
use minidsp::{
    transport::{hid, Multiplexer},
    Builder, Channel, Gain, MiniDSP,

async fn main() -> Result<()> {
    // Get a list of local devices
    let mut builder = Builder::new();

    let mut devices: Vec<_> = builder
        // Probe each candidate device for its hardware id and serial number
        // Filter the list to keep the working devices
        .filter_map(|x| async move { x.ok() })

    // Use the first device for further commands
    let dsp = devices
        .expect("no devices found")
        .expect("unable to open device");

    let status = dsp.get_master_status().await?;
    println!("Master volume: {:.1}", status.volume.unwrap().0);

    // Activate a different configuration

    // Set the input gain for both input channels
    for i in 0..2 {

    // Mute the last output channel



~407K SLoC