MCPcopy Create free account
hub / github.com/fogleman/nes / stepSweep

Method stepSweep

nes/apu.go:453–468  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451}
452
453func (p *Pulse) stepSweep() {
454 if p.sweepReload {
455 if p.sweepEnabled && p.sweepValue == 0 {
456 p.sweep()
457 }
458 p.sweepValue = p.sweepPeriod
459 p.sweepReload = false
460 } else if p.sweepValue > 0 {
461 p.sweepValue--
462 } else {
463 if p.sweepEnabled {
464 p.sweep()
465 }
466 p.sweepValue = p.sweepPeriod
467 }
468}
469
470func (p *Pulse) stepLength() {
471 if p.lengthEnabled && p.lengthValue > 0 {

Callers

nothing calls this directly

Calls 1

sweepMethod · 0.95

Tested by

no test coverage detected