Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows - Can console output inadvertently cause a system beep?

I have a C# console application that logs a lot to the console (using Trace). Some of the stuff it logs is the compressed representation of a network message (so a lot of that is rendered as funky non-alphabetic characters).

I'm getting system beeps every so often while the application is running. Is it possible that some "text" I am writing to the console is causing them?

(By system beep, I mean from the low-tech speaker inside the PC case, not any kind of Windows sound scheme WAV)


If so, is there any way to disable it for my application? I want to be able to output any possible text without the it being interpreted as a sound request.

like image 316
xyz Avatar asked Nov 28 '22 02:11

xyz


1 Answers

That's usually caused by outputting character code 7, CTRL-G, which is the BEL (bell) character.

The first thing I normally do when buying a new computer or motherboard is to ensure the wire from the motherboard to the speaker is not connected. I haven't used the speaker since the days of Commander Keen (and removing that wire is the best OS-agnostic way of stopping the sound :-).

like image 190
paxdiablo Avatar answered Nov 29 '22 16:11

paxdiablo