lasprs 0.14.3

Library for Acoustic Signal Processing (Rust edition, with optional Python bindings via pyo3)
Documentation
use crossbeam::channel::Sender;
use ndarray::ArcArray2;

use super::source::*;
use crate::daq::SharedInQueue;
use crate::filter::Equalizer;
use crate::*;
use crate::{config::*, siggen::SourceDescriptor};

/// Messages that can be send to the [StreamMgr::siggenCommand], to control the signal
/// generator.
#[cfg_attr(
    feature = "python-bindings",
    gen_stub_pyclass_complex_enum,
    pyclass(from_py_object)
)]
#[derive(Clone, Debug)]
pub enum SiggenCommand {
    /// Change the source to a new source with given descriptor
    ChangeSource {
        /// New signal source to apply for signal generator
        src: SourceDescriptor,
    },
    /// Set a new equalizer configuration for a set of output channels
    SetEqualizer {
        /// Channel indices to apply equalizer configuration to
        channels: Vec<usize>,
        /// New equalizer configuration. If None, the equalizer is removed from
        /// the prescribed channels
        eq: Option<Equalizer>,
    },

    /// Reset the signal generator state
    ResetSiggen {
        /// Sampling frequency \[Hz\]
        fs: StrictlyPositive,
    },

    /// Set gain for a single channel
    SetGain {
        /// Channel indices to apply gain to
        ch: usize,
        /// Linear gain level to apply to channel
        g: Positive,
    },

    /// Set all gains to value g
    SetAllGains {
        /// Linear gain level to apply to all channels
        g: Positive,
    },

    /// Change the mute state for a certain channel
    SetMuteChannel {
        /// channel index
        ch: usize,
        /// mute state
        mute: bool,
    },
    /// Change the mute state for all channels
    SetMuteAllChannels {
        /// mute state
        mute: bool,
    },
}