Windows CE 上主板发出蜂鸣声
我希望运行 Windows CE 的系统的主板发出“嘟嘟”声。我遇到的大多数信息/代码都使用 MessageBeep
,据我所知,它尝试使用声卡而不是主板上的硬件。
我正在使用 C++,但如果需要,您可以使用 C#.NET 吗? 我在小型 PC 上运行 Windows CE 6,而不是手持设备。
I wish to emit a "beep" from the motherboard of a system running Windows CE. Most information / code I have come across use MessageBeep
which, from what I can tell, attempts to use the soundcard as opposed to the hardware on the motherboard.
I am using C++ but can you C#.NET if required.
I am running Windows CE 6 on a small PC and not a hand held device.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过打印响铃字符?
Have you tried printing a bell character?
如果操作系统音频驱动程序没有连接到该设备(听起来好像不是,因为它来自声卡的设备),那么您将必须使用 ASM 代码直接访问它。您甚至可能必须将其放入驱动程序中(用户模式应该可以正常工作)才能访问硬件。
假设您使用的是 X86(我从未见过主板上带有扬声器的 ARM 设备),那么代码与运行任何其他操作系统的人使用的代码没有什么不同(因为您直接访问硬件)。快速搜索“x86 beep in asm”发现了一些有希望的线索。
If the OS audio driver isn't plumbed down to that device (and it sounds like it isn't since it's coming from the sound card's device) then you're going to have to go directly to it with ASM code. You might even have to put it into a driver (user mode should work fine) in order to get access to the hardware.
Assuming you're on an X86 (I've never seen an ARM device with a speaker on the motherboard) then the code is no different than that used by someone running any other OS (since you're going direct to the hardware). A quick search for "x86 beep in asm" turned up a couple promising leads.