Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

Module hw

Module hw 

Source
Expand description

The seam between sound bookkeeping and the SPU.

Everything above layer 0 in this crate (crate::mixer, crate::vloop) decides what the 24 voices should be doing and never touches a register itself. It reports each decision through Hw. On the console an implementation of Hw forwards to psx_spu::Voice; on a host, and in emulator golden tests, Recorder logs the calls in order so a test can assert on exactly what would have been written, and in which order.

The trait is deliberately the same size as the SPU’s own per-voice surface, so each method is one to three register writes and a recording is a faithful write trace.

Structs§

NullHw
An Hw that ignores everything. Useful when only the bookkeeping is being measured.
Recorder
An Hw that logs every call into a fixed buffer, in order.

Enums§

Event
One call made through Hw, as Recorder logged it.

Traits§

Hw
What the mixer needs from a sound chip.