Skip to content

Commit d1b43d1

Browse files
committed
Trvially add derive(Debug) to most AudioNode implementations
Missing: - Analyser - MediaSource nodes
1 parent 1bc2156 commit d1b43d1

18 files changed

+18
-1
lines changed

src/node/biquad_filter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ impl Default for BiquadFilterOptions {
292292
///
293293
/// - `cargo run --release --example biquad`
294294
///
295+
#[derive(Debug)]
295296
pub struct BiquadFilterNode {
296297
/// Represents the node instance and its associated audio context
297298
registration: AudioContextRegistration,

src/node/channel_merger.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl Default for ChannelMergerOptions {
6363
}
6464

6565
/// AudioNode for combining channels from multiple audio streams into a single audio stream.
66+
#[derive(Debug)]
6667
pub struct ChannelMergerNode {
6768
registration: AudioContextRegistration,
6869
channel_config: ChannelConfig,

src/node/channel_splitter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl Default for ChannelSplitterOptions {
6363
}
6464

6565
/// AudioNode for accessing the individual channels of an audio stream in the routing graph
66+
#[derive(Debug)]
6667
pub struct ChannelSplitterNode {
6768
registration: AudioContextRegistration,
6869
channel_config: ChannelConfig,

src/node/constant_source.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ enum Schedule {
6969
///
7070
/// - `cargo run --release --example constant_source`
7171
///
72+
#[derive(Debug)]
7273
pub struct ConstantSourceNode {
7374
registration: AudioContextRegistration,
7475
channel_config: ChannelConfig,

src/node/convolver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ pub struct ConvolverOptions {
106106
///
107107
/// - `cargo run --release --example convolution`
108108
///
109+
#[derive(Debug)]
109110
pub struct ConvolverNode {
110111
/// Represents the node instance and its associated audio context
111112
registration: AudioContextRegistration,

src/node/delay.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ struct PlaybackInfo {
9494
* > no need to make this cancellable, once in a cycle the node behaves like that
9595
* even if the cycle is broken later (user have to know what they are doing)
9696
*/
97+
#[derive(Debug)]
9798
pub struct DelayNode {
9899
reader_registration: AudioContextRegistration,
99100
writer_registration: AudioContextRegistration,

src/node/destination.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use super::{
3030
/// osc.start();
3131
/// ```
3232
///
33+
#[derive(Debug)]
3334
pub struct AudioDestinationNode {
3435
registration: AudioContextRegistration,
3536
channel_config: ChannelConfig,

src/node/dynamics_compressor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ impl Default for DynamicsCompressorOptions {
9696
///
9797
/// - `cargo run --release --example compressor`
9898
///
99+
#[derive(Debug)]
99100
pub struct DynamicsCompressorNode {
100101
registration: AudioContextRegistration,
101102
channel_config: ChannelConfig,

src/node/gain.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ impl Default for GainOptions {
2424
}
2525

2626
/// AudioNode for volume control
27+
#[derive(Debug)]
2728
pub struct GainNode {
2829
registration: AudioContextRegistration,
2930
channel_config: ChannelConfig,

src/node/iir_filter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ fn assert_valid_feedback_coefs(coefs: &[f64]) {
6666
// required sequence<double> feedforward;
6767
// required sequence<double> feedback;
6868
// };
69+
#[derive(Clone, Debug)]
6970
pub struct IIRFilterOptions {
7071
/// audio node options
7172
pub channel_config: ChannelConfigOptions,
@@ -134,6 +135,7 @@ pub struct IIRFilterOptions {
134135
///
135136
/// - `cargo run --release --example iir`
136137
///
138+
#[derive(Debug)]
137139
pub struct IIRFilterNode {
138140
/// Represents the node instance and its associated audio context
139141
registration: AudioContextRegistration,

0 commit comments

Comments
 (0)