Browse Source

Updating after review

master
Ryan Summers 2 months ago
parent
commit
3b055b8165
  1. 6
      src/hardware/signal_generator.rs

6
src/hardware/signal_generator.rs

@ -183,13 +183,13 @@ impl core::iter::Iterator for SignalGenerator {
Signal::Cosine => (dsp::cossin(self.phase_accumulator).0 >> 16),
Signal::Square => {
if sign {
-i16::MAX as i32
-1 << 15
} else {
i16::MAX as i32
1 << 15
}
}
Signal::Triangle => {
i16::MAX as i32 - (self.phase_accumulator.abs() >> 15)
(self.phase_accumulator >> 15).abs() - (1 << 15)
}
};

Loading…
Cancel
Save