Search code examples
c#audiobeep

Beep through the soundcard


I'm using beep (import from kernel) in C# to send tones through the headphone jack to another device that interprets them.

The problem is on some computers the beep occurs, but nothing is output to the hp jack. I think it's because it is using the internal speaker. How can I send it through the soundcard?


Solution

  • Older machines might still have a speaker, Console.Beep() will drive the speaker, not the soundcard. Not much you can do about it since this is a driver detail, but ask at superuser.com. This blog post has details about how this came about.

    Check out the NAudio library for a way to generate sound through the sound card.