简体   繁体   中英

How to redirect input from one sound card to another?

On my PC, I have a total of 2 sound cards. One of them is built-in to the motherboard and the other one is a USB sound card similar to the one below .

I have a microphone connected to sound card #1. When I speak into it, I want the output to be redirected to the speakers connected to sound card #2. And I need to enable this in my app.

The only app I've seen do this is the Virtual Audio Cable . I'd like to replicate the functionality in my app, but I have no idea where to start. I can start with just 2 sound cards, but eventually I'll need to be redirecting audio traffic with up to 4-8 sound cards.

I am happy to do it in .NET or VB6.

在此处输入图片说明

There is no "redirection" exactly operation taking place, instead you capture from one device and you send data to another device for playback. Virtual device is one of the options, with perhaps its own advantages, however in most cases a device is a tremendous overkill.

You just need standard audio APIs or libraries. Note that in Vista+ the "native" API for audio is WASAPI and other (esp. legacy APIs) are layers on top of it. Since APIs are mostly native and you want to a solution for managed code and you are starting from zero point, I would recommend using one of the popular audio libraries interfaced well into managed code domain, eg NAudio .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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