I'm trying to write a program that plays tones through the PC Speaker on OSX and Linux but I can't find any way to either directly access the PC speaker port or an API to go through. I know on Windows there is a function in windows.h, Beep(frequency, duration) which works well, how can I find something like that for Unix based platforms?
Look here: http://www.johnath.com/beep/ Also, you could compile this C program: #include <stdio.h> int main() { printf("\a"); return 0; } Should work on linux. Good luck!
I have recently completed a Windows program that uses Beep(frequency, duration) from windows.h to play primitive music through the PC speaker. I've looked into SDL to play it but it seems it's mostly just for playing pre-built wavs and midis. I looked at FMOD too, but I can't figure it out and the binaries won't run outside the debugger.