making computer beep?
Hey, pretty simple how can i make the computer "beep"? like from the speaker insdie the computer its self?
this is my favorite "scare the shit out of a newb" snippet:
hope you likey! HARHARHARHAR!
#include <iostream>#include <windows.h>using namespace std;int main(){ cout << "Warning: Proceeding will cause major system failure!\n"; for(int i = 0; i < 1500; i++) Beep(i, 6); MessageBox(NULL, "Your system is fried!", "KABLAM!", 0); return 0;}
hope you likey! HARHARHARHAR!
A system beep is actually an ASCII character. I forget what the value is, but you can access it by using the escape character \a. So outputting a \a to cout will cause a system beep.
Does anyone know of a way to play MIDI-esque music on the internal speaker similar to QBASIC's capabilities?
That has really no application, i woudlnt waste any time figureing that one out, go use openAL or something, its an elegant API, and its something that will still be useful to you later on...
plus, i would bet money you need to do some major backflips in order to modulate the sound of the beeps
-Dan
plus, i would bet money you need to do some major backflips in order to modulate the sound of the beeps
-Dan
Quote:Original post by Fruny
Beep(frequency, duration)
That reverts to a generic beep in Windows 95/98/ME. It's not really comparable as such, well, at least not for a few more years.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement