读取音频流到输出设备 [英] Reading audio stream to output device

查看:147
本文介绍了读取音频流到输出设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇,如果有一种方法来读取发送到音频输出的数据。我的最终目标是捕获音频,然后通过串行发送以进行音频处理。我使用的是Windows电脑。

I was curious if there is a way to read the data that is being sent to an audio output. My end goal is to capture the audio and then send it over serial for audio processing. I'm using a Windows computer.

似乎让这更困难的事情是,我不是读取捕获的麦克风输入,而是流式扬声器输出。

The thing that seems to be making this more difficult is that I'm not reading the captured microphone input, but rather the streamed speaker output.

有人可以帮助我吗?

推荐答案

简单的方法是利用 Stereo Mix 设备(如果可用)。这样你有一个音频捕获设备,这使您可用的设备音频输出混合下来。您可以从此设备读取,就像是一个真正的音频输入设备,例如线路输入或麦克风,使用标准和记录完善的API或音频库。

A more or less easy way is to take advantage of Stereo Mix device, where available. This way you have an audio capture device, which makes you available device audio output mixed down. You can read from this device as if it were a real audio input device such as Line In, or a microphone, using standard and well documented APIs or audio libraries.

其他选项更复杂,需要挂钩到系统和更深入地了解内部:您可以挂钩音频API来拦截应用程序发送到音频输出,或者安装应用程序使用的虚拟音频设备,您可以从中获取数据。

Other options are more sophisticated and require both hooking into system and deeper understanding of the internals: you either hook audio APIs to intercept what applications send to audio outputs, or you install a virtual audio device the applications use and you have the data available from.

这篇关于读取音频流到输出设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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