Skip to main content

dspk_core/
lib.rs

1//! Foundational primitives, timestamps, buffers, and masks for `dspk`.
2//!
3//! # Start here
4//!
5//! | Need | Look at |
6//! |---|---|
7//! | Choose a device | [`ComputeTarget`]: `ComputeTarget::from_env()?.client()?` picks the runtime named by `DSPK_RUNTIME`, else the first compiled in |
8//! | Describe or read a recording | [`RecordingSource`], [`RecordingInfo`], [`MemoryRecording`] |
9//! | Walk a recording larger than memory | [`ChunkSchedule`], [`HaloWindow`], [`WindowLoader`] |
10//! | Exact sample rates and times | [`SampleRate`], [`RationalTime`], [`TimeRange`] |
11//!
12//! Guides: <https://neuro-kitchen.github.io/dsp-kitchen/>.
13
14pub mod error;
15pub mod time;
16pub mod mask;
17pub mod buffer;
18#[cfg(feature = "compute")]
19pub mod compute;
20pub mod device;
21pub mod progress;
22pub mod recording;
23pub mod window;
24
25pub use device::{ComputeError, ComputeTarget};
26pub use error::{DspError, DspResult};
27pub use mask::ChannelMask;
28pub use time::{RationalTime, SampleRate, TimeRange};
29pub use buffer::{BufferLayout, MemoryOrder, SignalChunk};
30pub use recording::{
31    ChannelInfo, MemoryRecording, RecordingInfo, RecordingSource, SampleFormat, SignalUnit, MICROVOLTS_PER_VOLT,
32    SlicedRecording, ChannelMap, ChannelMapFile, ChannelPair, RemappedSource,
33};
34pub use progress::{NoProgress, ProgressEvent, ProgressSink};
35pub use window::{ChunkSchedule, HaloWindow, WindowLoader};