Struct APU::apu_envelope

Nested Relationships

This struct is a nested type of Class APU.

Struct Documentation

struct apu_envelope

APU Envelope. Generates a volume pulse that is then modified by sound channels.

Public Functions

void reset()

Reset envelope to the initial state.

void configure(uint8_t configuration)

Configure the envelope with the 0x4000/0x4004/0x400c byte.

Parameters

configuration – Conf byte with the following structure: xxLC NNNN x = not used L = loop flag C = constant volume flag N = envelope period/volume

void setStart(bool value)

Set the start flag.

Parameters

value – Value of the flag.

void clock()

Proceed one clock in the emulation.

uint8_t output() const

Envelope output.

Returns

Volume value (0-15).

Public Members

uint8_t dividerPeriodReloadValue = 0

Divider restore value and also a constant volume value.