在 silverlight 中播放蜂鸣声
我正在尝试制作一个用于学习莫尔斯电码的小应用程序,但我陷入困境,因为我不知道如何在 Silverlight 中播放蜂鸣声。 我怎样才能做类似的事情?
Console.Beep(Freq, elementLength)
(我制作了一个使用 Console.Beep 的控制台应用程序,但它工作得不太好(对于每分钟 20 个单词,点长度为 60 毫秒,两个符号之间的间距为 180 毫秒,所以对于字母开关来说是......(3 个点)在我的耳机中我听到 poc!不是清晰的声音)...我想解决方案是使用 DirectX/XNA) 您能否告诉我如何使应用程序发出蜂鸣声,如果 xna 是解决方案,您能否指导我查看教程(我不知道需要安装什么 sdk 以及从哪里下载) 谢谢
I am trying to make a small application for learning Morse code and I am stuck because I do not know how to play a Beep in Silverlight.
How can I do something like?
Console.Beep(Freq, elementLength)
(I have made a console application that uses Console.Beep and it does not work very well (for 20word per minute the dot length is 60ms and the space between 2 signs is 180ms so for letter s witch is ... (3 dots) in my headphones I hear poc! not a clear sound)... I suppose the solution is to use DirectX/XNA)
Can you please advise me how to make the application beep and if xna is the solution can you please direct me to a tutorial (I did not figure out what sdk I need to install and from where to download)
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,silverlight 中没有直接的“嘟嘟声”。然而,你有很多健全的能力;其中之一是使用 MediaElement 控件。因此,您可以将其中之一添加到您的页面中:
然后在后面的代码中您可以分配并调用声音:
然后您可以调用它来发出蜂鸣声:
感谢 forums.silverlight.net
There is no direct "beep" in silverlight, that I'm aware. However, you have a plethora of sound capabilities; one of which is using the MediaElement control. So, you could add one of those to your page:
Then in your code behind you can assign and call the sound:
Then you can call it for a beep:
Credits to forums.silverlight.net
看看这个..我想这就是你需要的..
http://silversynth.codeplex.com/
Look at this.. i think this is what you need..
http://silversynth.codeplex.com/