问题
How can I make the motherboard internal speaker produce sounds, for example using the Beep command but directed towards the motherboards speakers.
OS = Windows 7 x64
I currently know how to provide beeps to the default sound device, including tone and millisecond's but this does not answer my question since I cant force any of these sounds towards the motherboard internal speakers.
Beep(523, 500);
My question is mainly based around an alternative to Beep which would play through the motherboards speakers rather than the computer audio card. Or a way to direct the Beep command or incoming audio frequencies towards the motherboards speakers.
回答1:
The question was later specified to refer to Win32 programming environment, this question describes a Linux solution.
You can use the KIOCSOUND
ioctl to generate a tone, as such
ioctl(fd,KIOCSOUND,(int) tone)
The Linux Programming Interface is a fabulous book that describes using IOCTLs in detail, but there are public resources that describe the IOCTL such as the perennially classic TLDP.
回答2:
In Windows 7, Beep was rewritten to pass the beep to the default sound device for the session. This is normally the sound card, except when run under Terminal Services, in which case the beep is rendered on the client. source
There is apparently one possible modification of system descibed here.
来源:https://stackoverflow.com/questions/38883092/how-to-make-motherboard-beep-through-c-code