Advertisement

Text mode graphics

Started by September 04, 2000 12:56 PM
13 comments, last by furby100 24 years, 3 months ago
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.
------------------------------------------------------------He wants a shoehorn, the kind with teeth, because he knows there's no such thing.
Have you tried Win32 MessageBeep()?

    MessageBeep(-1);    


Haven''t tried it yet, but it should do the trick...

Advertisement
Can you change the frequency with messagebeep?

------------------------------
#pragma twice


sharewaregames.20m.com

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...
-----------------------------Sancte Isidore ora pro nobis !
I''m afraid it is a console program, so interrupts are out of the question (I think, unless someone can explain to me otherwise).

------------------------------
#pragma twice


sharewaregames.20m.com

This topic is closed to new replies.

Advertisement