以编程方式生成声音
我想开发一个 bada 应用程序,当用户触摸屏幕时生成注释。
有什么办法可以做到这一点吗?我记得我的旧 Amstrad CPC 464 有一条 BASIC 指令 SOUND,用于以编程方式生成声音。
有没有图书馆可以做到这一点?
I want to develop a bada application that generate notes when user touches the screen.
Is there any way to do that? I remember my old Amstrad CPC 464 had a BASIC instruction, SOUND, to generate sounds programmatically.
Is there any library to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Osp::Media 中,您有 TonePlayer 类或低级 AudioOut 类,它应该允许您播放您需要的任何内容。我认为生成带有正弦的数组并不难,但我认为今天的应用程序不应该发出一声蜂鸣声。最好包括从资源文件中播放并准备好蜂鸣声,并且可能允许用户使用自己的声音。
我认为 TonePlayer 很容易做你想做的事。查看他们的示例如何使用它。
in Osp::Media, you have TonePlayer classes, or low-level AudioOut class, which should alow you to play anything you need. I think generation of array with sinus is not that hard, but i do not think today's application should have one tone beeps. Better to include playing from resource file with prepared beeps, and maybe allow user to use his own sounds.
I think TonePlayer is easy enough to do what you want. See their example how they use it.