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
950 stars 52 forks source link

ZX Spectrum emulation produces weird fart-like noises when manipulating windows outside the emulator #992

Open nekoniaow opened 3 years ago

nekoniaow commented 3 years ago

The title says it all and I would not be surprised if you had a hard time believing it. ;)

When running the latest 2021-08-09 release and the ZX Spectrum emulator, the emulator emits weird short farty noises when focusing other windows (not the emulator's). Switching focus between the Finder and Discord windows almost systematically produces those sounds but switching from the Clock Signal window to another window seems to provoke the biggest sounds (longer, louder).

I initially thought this may come from some of my Mac sound plugins (I use SoundSource) but after quitting it the problem persisted.

OS: 10.14.6 iMac Late 2015 24 GB memory

TomHarte commented 3 years ago

I assume the problem is using a fixed assumption about how small my audio packets can be, which is probably bad in both directions since I could be missing out on the chance to use even smaller packets and thereby accrue even less latency on some systems. On macOS it currently picks the lowest packet size that is a power of two between 5ms and 10ms.

Out of curiosity, what output rate do you have your Mac set to? In case it hits an interesting corner case.

nekoniaow commented 2 years ago

I would gladly give you that number however I have no idea which output rate are you referring to. OS X does not let me specify that anywhere as far as I can tell nor does Clock Signal expose such a variable in a way that I am aware of.

ryandesign commented 1 year ago

I believe Thomas is referring to the output settings you can select in the Audio MIDI Setup app in your Utilities folder in your Applications folder.

nekoniaow commented 11 months ago

Ah, that one. Output rate on my machine is actually 44.1 kHz