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

Method stepEnvelope

nes/apu.go:436–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

434}
435
436func (p *Pulse) stepEnvelope() {
437 if p.envelopeStart {
438 p.envelopeVolume = 15
439 p.envelopeValue = p.envelopePeriod
440 p.envelopeStart = false
441 } else if p.envelopeValue > 0 {
442 p.envelopeValue--
443 } else {
444 if p.envelopeVolume > 0 {
445 p.envelopeVolume--
446 } else if p.envelopeLoop {
447 p.envelopeVolume = 15
448 }
449 p.envelopeValue = p.envelopePeriod
450 }
451}
452
453func (p *Pulse) stepSweep() {
454 if p.sweepReload {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected