Updating after review
This commit is contained in:
parent
a797a92ffd
commit
3b055b8165
|
@ -183,13 +183,13 @@ impl core::iter::Iterator for SignalGenerator {
|
||||||
Signal::Cosine => (dsp::cossin(self.phase_accumulator).0 >> 16),
|
Signal::Cosine => (dsp::cossin(self.phase_accumulator).0 >> 16),
|
||||||
Signal::Square => {
|
Signal::Square => {
|
||||||
if sign {
|
if sign {
|
||||||
-i16::MAX as i32
|
-1 << 15
|
||||||
} else {
|
} else {
|
||||||
i16::MAX as i32
|
1 << 15
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Signal::Triangle => {
|
Signal::Triangle => {
|
||||||
i16::MAX as i32 - (self.phase_accumulator.abs() >> 15)
|
(self.phase_accumulator >> 15).abs() - (1 << 15)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue