java 是否有内置的音频 _synthesis_ 库? [英] Does java have built in libraries for audio _synthesis_?

查看:33
本文介绍了java 是否有内置的音频 _synthesis_ 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意:我不想读取音频文件 foo.bar 并播放它."

Note: I do NOT want to "read audio file foo.bar and play it."

我想以编程方式即时生成音频文件并播放.

I want to programmatically generate audio files on the fly and play them.

Java 是否为此内置了库,还是属于依赖于系统的库?

Does Java have built in libraries for this, or does this fall into the system-dependent libraries?

谢谢!

推荐答案

这个 Sun 论坛post 有一些有趣的代码来生成正弦音.此外,鉴于 WAV 文件格式并不过分复杂,您可以创建一个表示所需波形的表格,然后将其写入文件.周围有一些例子,例如原始音频转换器如何编写wav文件.

This Sun forum post has some interesting code for generating sin tones. Also, given that the WAV file format is not overly complicated, you could create a table representing the desired waveform and then write it to a file. There are a few examples around, e.g. a raw audio converter and how to write a wav file.

这篇关于java 是否有内置的音频 _synthesis_ 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆