lasprs/src/lib.rs

46 lines
1.1 KiB
Rust
Raw Normal View History

2023-11-22 13:40:16 +00:00
//! # Library for acoustic signal processing
//!
//! This crate contains structures and functions to perform acoustic measurements, interact with
//! data acquisition devices and apply common acoustic analysis operations on them.
2023-11-22 13:40:16 +00:00
#![warn(missing_docs)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(unused_imports)]
mod config;
pub mod filter;
// pub mod window;
// pub mod ps;
pub mod daq;
pub mod siggen;
#[cfg(feature = "extension-module")]
use pyo3::prelude::*;
/// A Python module implemented in Rust.
#[cfg(feature = "extension-module")]
#[pymodule]
#[pyo3(name="_lasprs")]
fn lasprs(py: Python, m: &PyModule) -> PyResult<()> {
pyo3_add_submodule_filter(py, &m)?;
Ok(())
}
/// Add filter submodule to extension
#[cfg(feature = "extension-module")]
fn pyo3_add_submodule_filter(py: Python, m: &PyModule) -> PyResult<()> {
// Add filter submodule
let filter_module = PyModule::new(py, "filter")?;
filter_module.add_class::<filter::Biquad>()?;
filter_module.add_class::<filter::SeriesBiquad>()?;
filter_module.add_class::<filter::BiquadBank>()?;
m.add_submodule(filter_module)?;
Ok(())
}
2023-11-22 13:40:16 +00:00