1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! DSP processing context.
//!
//! This module provides [`DspContext`], which carries audio processing parameters
//! through the DSP graph during block processing.
use crateChannelLayout;
/// Default buffer size for DSP graphs (512 samples).
pub const DEFAULT_BUFFER_SIZE: usize = 512;
/// Default sample rate for DSP graphs (44100 Hz).
pub const DEFAULT_SAMPLE_RATE: f64 = 44100.0;
/// Runtime context passed to blocks during audio processing.
///
/// Contains the audio specification (sample rate, channels, buffer size) and
/// the current playback position. This context is passed to every block's
/// `process()` method, allowing time-dependent calculations.