Skip to content

Commit

Permalink
Added simple flag to enable the debug temporarily during development
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownSuperficialNight committed Sep 27, 2024
1 parent 625d0f2 commit 6b62544
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/source/agc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ where

// Output current gain value for monitoring and debugging purposes
// Must be deleted before merge:
println!("Current gain: {}", self.current_gain);
// Added flag so its usable without the debug temporarily during development
if std::env::args().any(|arg| arg == "--debug-gain") {
println!("Current gain: {}", self.current_gain);
}

// Apply the computed gain to the input sample and return the result
value.amplify(self.current_gain)
Expand Down

0 comments on commit 6b62544

Please sign in to comment.