linuxbeep
public cpp v1 · immutable#include <iostream>#include <cstdlib>using namespace std;int main(){int fd;int tone;double freq;fd = open("/dev/tty1", O_RDONLY | O_NOCTTY);/*tone = 60;freq = 13.75f * pow(2, tone / 12.0f);*/freq = 10000f;while(true){ioctl(fd, KIOCSOUND, (int) (1190000 / freq));}return 0;}