Playing sound through the motherboard’s speaker (Commonly referred to as PC Speaker or Internal Spea

Hi,

Is there a windows SDK function call I can use to generate sound to my internal speaker directly? I have tried Beep() and MessageBeep() functions. Both of them plays through the default playback endpoint. Currently, if some of you remembers this, I am modifying
bytes at port (or register?) 43h, 42h, and 61h directly. This method works on most of the Windows 7 systems I have tested. On some Windows 7 systems the internal speaker stops working after several I/O calls. I would like to call a function from Windows SDK
as much as possible because I don’t know how safe it is for a user-mode application to modify the content of these ports directly.

Beep() and MessageBeep() still does not generate sound through the internal speaker even after I disabled all playback and recording endpoints. The functions do not return any failure return value, however.

Thanks,

As of Windows 7, calls to Beep() and MessageBeep() are routed through the audio stack.http://blogs.msdn.com/b/larryosterman/archive/2010/01/04/what-s-up-with-the-beep-driver-in-windows-7.aspxI’m not aware of any publically available way to play directly through the internal speaker./