Expand description
HeadlessPlatform: a backend with no window, no clock, no heap
counter and no memory tags (unless a test hands it them) and no sound
card. It plays scripted input and system events, records the frames
presented to it, keeps its storage in memory, and stands in for the
music player (Speaker), so a screen that keeps time with the music
is tested too.
The test Harness runs games on it, through the same
App::frame the devices do. It is also the
smallest complete backend, for anyone writing one
(docs/platform-backends.md).
Structs§
- Added
Play - A play of a sound the game added at run time, as the
Speakerheard it: the samples it played. Only theSpeakerbuilds one (ADR-0039). - Headless
Platform - A backend with no devices, for tests and tools.
- Playing
Sound - A sound started with a handle that the
Speakerholds as playing. Only theSpeakerbuilds one (ADR-0039). - Scripted
Keyboard - A system keyboard that answers from a script: each time it opens it gives the next answer, at the next poll.
- Speaker
- The headless backend’s sound device: it records what the last frame
played, works out which music “sounds” from the music commands and the
clock, and keeps the sounds started with a handle until they stop (one
that plays once too: it knows no lengths). Like
shuyi-app, it mutes rather than pauses: whilesuspendedits music clock runs on. It keeps the sounds the game added at run time, and hears every play of them (added_plays). A voice clip sounds from its request until it is stopped or replaced, or until the length a test gave clips has passed (set_voice_length).
Enums§
- Presented
- A frame as the headless backend keeps it.
Type Aliases§
- Present
Hook - What runs on each frame a
HeadlessPlatformis presented, in itspresent: the work a device’s backend does there, such as a one-bit display’s conversion, so a frame measured headless counts it (HeadlessPlatform::set_present_hook).