录音使用Qt系统声音 [英] Recording system sound using Qt
问题描述
我有记录系统的声音(不是麦克风,整个系统的声音 - 是去扬声器从PC的所有内容)的问题。我知道,平时我应该使用WASAPI或BASS,但WASAPI有这样可怕的文档(至少对我来说),我只是不知道他们居然要我做,使这项工作。 BASS文档也不是那么太有吸引力,相较于Qt的优秀样本。
I have question about recording system sound (not microphone, whole system sound - everything that goes to the speakers from PC). I know that normally I should use WASAPI or BASS, yet WASAPI has such horrible documentation (at least for me), that I just don't know what they actually want me to do to make this work. BASS documentation is not so appealing too, compared to excellent Qt samples.
有没有Qt的包装或类似的东西,让我捕捉到简单的方式该端点音频而不直接使用WASAPI?
Is there any Qt wrapper or something similar that will allow me to capture this endpoint audio in simple way without using WASAPI directly?
推荐答案
由于在评论中提到的,你显示隐藏的设备,并实现了从控制面板中的声音设置了立体声混音录音设备后,该设备将现成的Qt中使用。
As mentioned in the comments, after you show the hidden devices and enable the "stereo mix" recording device from the sound settings in control panel, the device will be readily available for use in Qt.
您可以快速查询系统确认:
You can quickly query the system to verify that:
auto info = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
foreach (auto i, info) qDebug() << i.deviceName();
这对我来说输出:
Which for me outputs:
"Microphone (Realtek High Defini"
"Stereo Mix (Realtek High Defini"
这篇关于录音使用Qt系统声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!