I remember that \a business too, but you can''t choose the frequency for this. In conio.h (I think it''s conio), there is a function called sound(). Just put the frequency (in hertz) that you want the tone to be. Then you have to use the delay() function, which is in dos.h (maybe sound() is in dos.h too...), and use that with the number of milliseconds you want the tone to be, then you call nosound(). Kinda like this.
sound(2600); //2600 hertz
delay(1000); //for 1 second
nosound();
//I think it''s nosound(), but I can''t remember for sure
It''s been a while since I''ve used that, but that''s basically it.
Text mode graphics
------------------------------------------------------------He wants a shoehorn, the kind with teeth, because he knows there's no such thing.
Have you tried Win32 MessageBeep()?
Haven''t tried it yet, but it should do the trick...
MessageBeep(-1);
Haven''t tried it yet, but it should do the trick...
Can you change the frequency with messagebeep?
------------------------------
#pragma twice
------------------------------
#pragma twice
I am not sure for C, but I know that if you look up the proper interrupt, there is a nice little function that does all this beeping stuff nicely (well, if you can consider ASM as ''nice'').
I don''t have the number though, but with a little effort, you should find...
I don''t have the number though, but with a little effort, you should find...
-----------------------------Sancte Isidore ora pro nobis !
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement