Swanium::Core::Apu
Inherits Reference < Object
Deterministic WonderSwan sound unit. It produces interleaved signed 16-bit stereo PCM at 24 kHz from the 3.072 MHz machine clock.
Constants
Constructors
Instance methods
Transfers the completed PCM buffer to the audio backend and starts a fresh producer buffer. This makes consuming audio a single operation instead of relying on callers to remember a separate clear step.
CPU-visible digital mixer registers 0x96--0x9B are derived from the current oscillator state; they are not ordinary writable latches.
Returns a copy for inspection without exposing the APU's producer buffer to callers.
Channel 2 voice mode streams signed PCM through port 0x89. Games such as Last Alive alternate two streams at roughly twice the audio rate; the hardware's analog stage averages adjacent writes. Feeding this at write time (rather than sampling the port once per audio frame) removes the characteristic harsh multiplex buzz.