内部录音程序

发布于 2024-09-14 18:11:48 字数 1436 浏览 1 评论 0原文

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

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

发布评论

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

评论(2

べ映画 2024-09-21 18:11:48

您想要做的事情非常依赖于操作系统。您需要编写一个程序来创建一个假音频输出设备,操作系统可以将声音发送到该设备。您将在用户点击“录制”时捕获音频流,并在用户点击“停止”时停止捕获,而不是播放音频。然后,您需要将捕获的音频数据编码为所需的声音文件格式(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.

二智少女猫性小仙女 2024-09-21 18:11:48

如果您要使用 C#,请为您指明正确的方向。
.NET 框架不支持执行此操作,但是您可以从 .NET 访问 Windows API。一个好的起点是 http://www.pinvoke.net
您还可以找到用 C# 编写的每个 API 的代码。我不知道您应该使用哪个 API 调用,但如果有的话,它会在 Win32 API 中退出。我知道有一种软件可以满足您尝试完成的任务。该软件的名称是 Spotify Ripper。如果您使用 API 间谍软件,您也许能够看到该软件正在使用哪些 API 调用!

To point you to right direction if you are going to use C#.
There is no support for doing this in .NET framework, however you can access Windows API from .NET. A good start point is http://www.pinvoke.net.
You’ll also find the code for each API write in C#. I have no clue which API calls you should use, but if there is any then it exit in Win32 API. I know of a software that dose what you try accomplish. The name of the software is Spotify Ripper. If you use an API spy software you may be able to see which API calls this software is using!

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