()
| 97 | } |
| 98 | |
| 99 | func (apu *APU) Step() { |
| 100 | cycle1 := apu.cycle |
| 101 | apu.cycle++ |
| 102 | cycle2 := apu.cycle |
| 103 | apu.stepTimer() |
| 104 | f1 := int(float64(cycle1) / frameCounterRate) |
| 105 | f2 := int(float64(cycle2) / frameCounterRate) |
| 106 | if f1 != f2 { |
| 107 | apu.stepFrameCounter() |
| 108 | } |
| 109 | s1 := int(float64(cycle1) / apu.sampleRate) |
| 110 | s2 := int(float64(cycle2) / apu.sampleRate) |
| 111 | if s1 != s2 { |
| 112 | apu.sendSample() |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func (apu *APU) sendSample() { |
| 117 | output := apu.filterChain.Step(apu.output()) |
nothing calls this directly
no test coverage detected