简体   繁体   English

录制应用程序的音频输出

[英]Recording audio output from application

I'm currently building a project on C++ using Visual Studio on Windows 8. This application captures video from camera and triggers some virtual animations in real-time, with some sounds being played along with the animations. 我目前正在使用Windows 8上的Visual Studio在C ++上构建一个项目。此应用程序从摄像机捕获视频并实时触发一些虚拟动画,并与动画一起播放一些声音。

The user has the option to record the experience in video and sound. 用户可以选择在视频和声音中记录体验。 I already am able to record video, now I want to create a audio track of the sounds that are being played by the application, to later fuse both video and audio files. 我已经可以录制视频了,现在我想为应用程序正在播放的声音创建音轨,以便以后融合视频和音频文件。

So, which is the best way to record audio output from an application in windows? 那么,哪种方法是在Windows中记录应用程序的音频输出的最佳方法? Let me stress that I do NOT want to record audio from any input devices (such as a microphone), only from the application itself. 让我强调一点,我不想只从应用程序本身录制任何输入设备(例如麦克风)的音频。

Best regards. 最好的祝福。

There is no recording of application output. 没有记录应用程序输出。 If you generate audio on your own, you make a copy for the recording purposes, mix if you have multiple sources, and then use one of the APIs to produce a file depending on your preferences: directly writing a WAV file, Windows Media audio files (ASF/WMA), DriectShow, Media Foundation, third party libraries. 如果您自己生成音频,则可以复制用于录制的目的,如果有多个来源则可以混合使用,然后根据自己的喜好使用一种API来生成文件:直接编写WAV文件,Windows Media音频文件(ASF / WMA),DriectShow,Media Foundation,第三方库。

Real playback audio data is being mixed and sent for further playback. 实际播放的音频数据将被混合并发送以进行进一步播放。 Sometimes you can enable loopback recording to capture fully mixed output (not just of specific application through) as if it is a capture from realtime audio input device. 有时,您可以启用回送录制以捕获完全混合的输出(而不仅仅是通过特定应用程序),就像从实时音频输入设备捕获一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM