如何在.NET Compact Framework 2.0 中播放感叹号或星号声音?
我想向用户创建声音反馈,以表明数据验证成功或失败。播放系统星号和感叹号声音似乎是执行此操作的正确方法,特别是因为设备可能配置了非标准声音。
问题是 System.Media 在 .NET Compact Framework 2.0 中无法播放它们。
我必须通过哪些替代方式来播放这些系统声音?
I want to create audible feedback to the user to signal success or failure of data validation. Playing the system Asterisk and Exclamation sounds seem to be the proper way to do this, especially since the device may have non-standard sounds configured.
The problem is that System.Media is not available in the .NET Compact Framework 2.0 to play them.
What alternative ways do I have to play these system sounds?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里有一篇完整的文章
There is a whole article on this here
我一直走这条路。 PlaySound API(实际上使用 CoreDll.DLL)是关于你唯一的选择。
我为此有一个静态类,但结果不够响亮,最终用使用 Symbol.Audio 类(符号条形码扫描仪)的代码替换它。
I've been down this road. The PlaySound API (which uses CoreDll.DLL acutally) is about the only option you have.
I had a static class for this, but the results weren't loud enough and ended replacing it with code that used the Symbol.Audio classes (symbol bar code scanner).