将声音输出到声卡的多个通道

发布于 2024-10-16 15:09:20 字数 139 浏览 2 评论 0原文

我正在尝试用 Java 构建一个程序,该程序能够将声音输出到声卡上的不同输出线。

SCHEME

Java 中怎么可能做到这一点?

I am trying to build a program in Java, which would be able to output sound to different output lines on my sound card.

SCHEME

How is it possible to do in Java?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

野稚 2024-10-23 15:09:20

我不确定您在处理声音方面有什么背景(它可能比我的大),但我认为您拥有的是要定向到多个端口的多条线路? http://download.oracle.com /javase/7/docs/api/javax/sound/sampled/package-summary.html - 这可能是一个 API,我对此不太了解(我见过一个程序使用了一些东西就像 VoIP 一样)。
顺便说一句,如果您在 Windows 上工作,我相信有关您的声卡的一些信息存储在注册表中,您可能必须从程序更新注册表才能访问它(不确定)。

我希望我能有所帮助:)

I'm not sure what background you have in working with sound (it might be bigger than mine) but what I think you have is a number of lines that you want to direct to a number of ports? http://download.oracle.com/javase/7/docs/api/javax/sound/sampled/package-summary.html - This might be an API for this, which I don't know much about (I've seen a program using something like that with VoIP).
By the way if yr working on Windows, I believe that some information about your soundcard is stored in the registry, and you might have to update the registry from the program to gain access to it (not sure).

I hope I helped somehow :)

如梦 2024-10-23 15:09:20

查看 Java 声音程序员指南。

为了让它工作,我必须重新配置我的声卡,将其端口公开为单独的“输出”;否则,声卡将根据是否插入耳机自动路由声音。(在 Windows 上。)

Check out the Java sound programmer's guide.

To get this to work I had to reconfigure my sound card to expose its ports as separate "outs"; otherwise the sound card would route the sound automatically depending on whether a pair of headphones were plugged in. (On Windows.)

海螺姑娘 2024-10-23 15:09:20

您可以使用 Jack(Jack 音频连接套件)将声音路由到声卡。它有点复杂,它不适用于pulseaudio,但你可以让它工作。

JnaJack 通过 JNA 提供从 Java 到 Jack API 的接口。这真的很容易。

我在这里更详细地写了它

You can use Jack (Jack Audio Connection Kit) to route sound to your soundcard. It is a little complicated, it doesn't work with pulseaudio, but you can make it work.

JnaJack provides an interface from Java to the Jack API via JNA. It's really quite easy.

I wrote it up in more detail here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文