用 Java 捕获扬声器输出 [英] Capturing speaker output in Java

查看:38
本文介绍了用 Java 捕获扬声器输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Java 是否可以捕获扬声器输出?此输出不是由我的程序生成的,而是由其他正在运行的应用程序生成的.这可以用 Java 来完成还是我需要求助于 C/C++?

Using Java is it possible to capture the speaker output? This output is not being generated by my program but rather by other running applications. Can this be done with Java or will I need to resort to C/C++?

推荐答案

我有一个基于 Java 的应用程序.使用 Java Sound 来挖掘流经系统的声音以追踪它.它在我自己的(基于 Windows 的)机器上运行良好,但在其他一些机器上完全失败.

I had a Java based app. that used Java Sound to tap into the sound flowing through the system to make a trace of it. It worked well on my own (Windows based) machine, but failed completely on some others.

确定为了让它在这些机器上工作,除了软件或硬件中的音频环回之外别无他法(例如将引线从扬声器输出"插孔连接到麦克风输入"杰克).

It was determined that in order to get it working on those machines, would take nothing short of an audio loop-back in either software or hardware (e.g. connect a lead from the speaker 'out' jack to the microphone 'in' jack).

因为我真正想做的只是为音乐绘制轨迹,并且我想出了如何在 Java 中播放目标格式 (MP3),因此没有必要进一步追求其他选项.

Since all I really wanted to do was plot the trace for music, and I figured how to play the target format (MP3) in Java, it became unnecessary to pursue the other option further.

(而且我还听说 Mac 上的 Java Sound 被严重损坏,但我从未仔细研究过.)

(And I also heard that Java Sound on Mac. was horribly broken, but I never looked closely into it.)

这篇关于用 Java 捕获扬声器输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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