TomHarte / CLK

A latency-hating emulator of: the Acorn Electron and Archimedes, Amstrad CPC, Apple II/II+/IIe and early Macintosh, Atari 2600 and ST, ColecoVision, Enterprise 64/128, Commodore Vic-20 and Amiga, MSX 1/2, Oric 1/Atmos, early PC compatibles, Sega Master System, Sinclair ZX80/81 and ZX Spectrum.
MIT License
931 stars 52 forks source link

Convert AY to a SampleSource. #1330

Closed TomHarte closed 7 months ago

TomHarte commented 7 months ago

Also overtly to do with getting to the Mockingboard shortly:

For now there's possibly a processing cost* but I can likely alleviate that later; since this audio processing is always done on its own thread it shouldn't affect user perception — the main emulation thread will still be substantially slower than the audio thread.

* the explicit instantiation of AY38910 hopefully provides the compiler with enough visibility of AY38910SampleSource to appropriately inline advance() and level() but this hasn't been verified.