(value byte)
| 396 | } |
| 397 | |
| 398 | func (p *Pulse) writeControl(value byte) { |
| 399 | p.dutyMode = (value >> 6) & 3 |
| 400 | p.lengthEnabled = (value>>5)&1 == 0 |
| 401 | p.envelopeLoop = (value>>5)&1 == 1 |
| 402 | p.envelopeEnabled = (value>>4)&1 == 0 |
| 403 | p.envelopePeriod = value & 15 |
| 404 | p.constantVolume = value & 15 |
| 405 | p.envelopeStart = true |
| 406 | } |
| 407 | |
| 408 | func (p *Pulse) writeSweep(value byte) { |
| 409 | p.sweepEnabled = (value>>7)&1 == 1 |
nothing calls this directly
no outgoing calls
no test coverage detected