How can I make PC-speaker to produced different sounds (beeping).
Printable View
How can I make PC-speaker to produced different sounds (beeping).
Hi,
You could use " \a" which is the bell.
Example
Code:printf("\n \a ERROR Invalid Input");
/*to prompt user input is invalid*/
Well... I knew that one already,
but thanx anyway.;)
P.S.
Does anyone know how to change the tone of the beeping?
U can use sound function with different frequencies to achive
what u want
Yet another compiler-dependent thing... which one are you using?
In Borland C, use the sound(int freq) function in dos.h to play a sound out through the PC speaker.
I don't think you can change the alarm tone in most compilers.