内部录音程序 [英] internal audio recording program

查看:175
本文介绍了内部录音程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意:这不是使用麦克风的东西。我想内部记录音频。

NOTE: This isn't something that would use a mic. I want to INTERNALLY record audio.

我想用C#或Java编写一个程序来记录发送到计算机扬声器的音频数据。最终产品将允许用户点击记录按钮,此时正在播放的任何内容都将在内部记录,直到用户点击停止按钮,此时收集的所有数据将保存到音频文件中,如wav,mp3等。

I would like to write a program in C# or Java that records audio data sent to the speakers in my computer. The end product would allow the user to hit a "record" button, and anything being played at the moment would be recorded internally until the user hits the "stop" button, at which point all data collected is saved to an audio file like a wav, mp3, etc.

我有一台MacBook Pro并行运行Windows 7。我可以访问多台PC,因此我也可以在纯Windows平台上工作。理想情况下,无论什么平台都没关系。

I have a MacBook Pro that runs Windows 7 in parallel. I have access to several PCs, so I also can work on a pure Windows platform. Ideally it wouldn't matter what platform, though.

我不知道从哪里开始 - 我用音乐做过的最多就是玩一个。 Java中的wav文件。如果有人对这两种语言都有任何建议,参考,建议,技术偏好,我很乐意在这里!

I have no idea where to get started--the most I've ever done with music is to play a .wav file in Java. If anyone has any advice, references, suggestions, technology preferences for either language, etc., I'd love to here it!

推荐答案

您要做的是非常依赖于操作系统。您需要编写一个程序,创建一个假的音频输出设备,操作系统可以发送声音。一旦用户点击记录而不是播放音频,您将捕获音频流,并在用户点击停止时停止捕获。然后你需要将捕获的音频数据编码成所需的声音文件格式(wav,mp3等)。

What you are trying to do is very operating system dependent. You would need to write a program that creates a fake audio output device that the operating system could send the sounds to. Instead of playing the audio you would capture the audio stream once the user hits "record" and stop capturing when the user hits "stop". Then you would need to encode the captured audio data into the desired sound file format (wav, mp3, etc.).

你可以做你想要的,但这是一项非常重要的任务,因为您正在与操作系统的音频硬件抽象层和编码音频连接。

It is possible to do what you are asking, but it is a non-trivial task since you are interfacing with the operating system's audio hardware abstraction layer and encoding audio.

这篇关于内部录音程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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