感谢您来到这里。
我有两个连接到PC的麦克风,我想同时录制它们的声音。有可能做到这一点吗?任何方法。也许我需要购买一些设备?
最佳答案
您应该能够使用麦克风类获取可用的录音设备列表
// Get list of Microphone devices and print the names to the log
void Start()
{
foreach (var device in Microphone.devices)
{
Debug.Log("Name: " + device);
}
}
您可以使用此设备列表从每个设备创建音频片段
[SerializeField]
private AudioSource audioSource1;
[SerializeField]
private AudioSource audioSource2;
// Start recording with built-in Microphone and play the recorded audio right away
private IEnumerator Record()
{
audioSource1.clip = Microphone.Start("<audio-device-1>", true, 10, 44100);
audioSource2.clip = Microphone.Start("<audio-device-2>", true, 10, 44100);
}
关于c# - 在Unity C#中使用两个麦克风进行录音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53359442/