Documentation ¶
Index ¶
Constants ¶
View Source
const ( FrameCounterRate = float64(consts.CPUFrequency) / 240.0 DefaultSampleRate = float64(consts.CPUFrequency) / float64(consts.AudioSampleRate) * consts.FrameRateDifference BufferCap = consts.AudioSampleRate / 5 * 8 )
View Source
const ( StatusPulse1 = 1 << iota StatusPulse2 StatusTriangle StatusNoise StatusDMC StatusFrameInterrupt StatusDMCInterrupt )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APU ¶
type APU struct { Enabled bool `msgpack:"-"` SampleRate float64 `msgpack:"-"` Square [2]Square Triangle Triangle Noise Noise DMC DMC Cycle uint FramePeriod uint8 FrameValue byte IRQEnabled bool `msgpack:"alias:IrqEnabled"` IRQPending bool `msgpack:"alias:IrqPending"` // contains filtered or unexported fields }
type DMC ¶
type DMC struct { Enabled bool Value byte IRQEnabled bool `msgpack:"alias:IrqEnabled"` IRQPending bool `msgpack:"alias:IrqPending"` Loop bool TickPeriod byte TickValue byte SampleAddr uint16 SampleLen uint16 CurrAddr uint16 CurrLen uint16 ShiftRegister byte BitCount byte // contains filtered or unexported fields }
func (*DMC) SetEnabled ¶
type Noise ¶
type Noise struct { Enabled bool EnvelopeEnabled bool EnvelopeLoop bool EnvelopeStart bool EnvelopeVol byte EnvelopePeriod byte EnvelopeValue byte Volume byte LoopNoise bool ShiftRegister uint16 TimerPeriod uint16 TimerValue uint16 LengthEnabled bool LengthValue byte }
func (*Noise) SetEnabled ¶
type Square ¶
type Square struct { Enabled bool Channel1 bool DutyMode byte DutyValue byte EnvelopeEnabled bool EnvelopePeriod byte EnvelopeLoop bool EnvelopeStart bool EnvelopeVol byte EnvelopeValue byte Volume byte SweepEnabled bool SweepPeriod byte SweepNegate bool SweepShift byte SweepReload bool SweepValue byte LengthEnabled bool LengthValue byte TimerPeriod uint16 TimerValue uint16 }
func (*Square) SetEnabled ¶
Click to show internal directories.
Click to hide internal directories.