X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.150.34.10 From: "Fausto Arinos Barbuto" Newsgroups: comp.os.msdos.djgpp References: <483gjvFh8q8aU1 AT news DOT dfncis DOT de> Subject: Re: sound(), delay(), etcoetera Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: Date: Sun, 19 Mar 2006 22:15:55 GMT NNTP-Posting-Host: 24.70.95.207 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw3no 1142806555 24.70.95.207 (Sun, 19 Mar 2006 15:15:55 MST) NNTP-Posting-Date: Sun, 19 Mar 2006 15:15:55 MST Organization: Shaw Residential Internet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Hans-Bernhard Broeker" wrote in message news:483gjvFh8q8aU1 AT news DOT dfncis DOT de... > Fausto Arinos Barbuto wrote: > >> they don't seem to work on my computer (HP a810n, AMD-64, >> Realtek AC'97 Audio). For example, the sample code below >> compiles like a charm but produces no sound or delay at all: > > The sound produced by sound() is supposed to come out of your system's > beeper. If the system doesn't have such a thing, and/or the drivers > don't support DOS, or you've silenced the beeper in your sound > hardware's volume control panel, then you won't hear anything. 4000 > Hz is also rather high --- it's uncertain the beeper supports it. > > This much simplified programs works just fine on my laptop: > > #include > #include > > int main() { > sound(1000); > delay(1000); > nosound(); > return 0; > } Many thanks for your help. Unfortunately, although your program compiles beautifully, it produces no beep at all. And yes, I knew that the beep should come from the beeper, not from the sound boxes (speakers). ;-) I sent your code to a friend in the US who has Borland's C/C++ compiler. He compiled it with minor changes, zipped the executable and sent it to me. The exe he created *does* produce a 1-second beep on the beeper! So, not only do I have a beeper but it can indeed beep! Don't know what to think anymore -- maybe I found a little bug in GCC? Before I raise any eyebrows, I must say that I am not trolling, I'm not willing to start a flame war and above all I am not into the familiar this-compiler-is- better-than-that-one rubbish. I'm just reporting things I've found. Thanks again and regards, ---Fausto