问题描述
如何使主板内置扬声器发出声音,例如使用Beep命令但直接指向主板扬声器.
How can I make the motherboard internal speaker produce sounds, for example using the Beep command but directed towards the motherboards speakers.
我目前知道如何向默认声音设备(包括音调和毫秒)发出蜂鸣声,但这并不能回答我的问题,因为我无法将这些声音中的任何声音强加给主板内部扬声器.
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);
我的问题主要是基于Beep的替代方案,它将通过主板扬声器而不是计算机声卡播放.或将哔"命令或传入的音频频率引向主板扬声器的方法.
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.
推荐答案
该问题后来被指定为引用Win32编程环境,该问题描述了Linux解决方案.
您可以使用 KIOCSOUND
ioctl生成音调,例如
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)
Linux编程接口是一本非常棒的书,详细介绍了如何使用IOCTL,但是有一些公共资源描述IOCTL,例如常年使用的经典TLDP .
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.
这篇关于如何通过C ++代码使主板发出蜂鸣声?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!