()
| 683 | } |
| 684 | |
| 685 | func (n *Noise) stepTimer() { |
| 686 | if n.timerValue == 0 { |
| 687 | n.timerValue = n.timerPeriod |
| 688 | var shift byte |
| 689 | if n.mode { |
| 690 | shift = 6 |
| 691 | } else { |
| 692 | shift = 1 |
| 693 | } |
| 694 | b1 := n.shiftRegister & 1 |
| 695 | b2 := (n.shiftRegister >> shift) & 1 |
| 696 | n.shiftRegister >>= 1 |
| 697 | n.shiftRegister |= (b1 ^ b2) << 14 |
| 698 | } else { |
| 699 | n.timerValue-- |
| 700 | } |
| 701 | } |
| 702 | |
| 703 | func (n *Noise) stepEnvelope() { |
| 704 | if n.envelopeStart { |
nothing calls this directly
no outgoing calls
no test coverage detected