How can I write software to play audio clips directed to a recorder?

I want to write a program that allows users to play sound clips into their microphone (recording device) so that they can mix in the clips with their voice when using VOIP software (like Ventrillo or Skype) from their PC. When I say play sound clips into my microphone, I mean the user presses a button and the sound clip plays in a way that both the user and the people on the other end of the VOIP connection can hear. What API functions can I use for Windows?

+3


source to share


1 answer


There is no standard API for "playing audio into microphone". That is, when applications want to capture audio, and they use an API to receive an audio stream, there is no standard way to define this process and update the captured audio on the fly. To add to this, there are several audio interfaces with significant differences.

Playing audio to a playback device is thus easy and is a typical audio API task that does not even deserve special attention in the context of this question. Changing the captured audio stream is usually a task for capturing an application. As soon as it grabs the data, the application can freely modify it, in particular, mixing an additional channel into it.



Now, if your request is to change the behavior of a third-party audio device such as Skype, not having the ability to directly connect to an audio conference, you will generally want to implement a virtual audio capture device that created the feed itself with the flexibility to mix real-world captured data and additional content. ... If a third party application is configured to record from such a virtual device, it starts receiving data from - effectively - your device / component directly. The task of creating virtual audio devices is complicated by the fact that there are several APIs and different applications use different APIs to capture audio, creating virtual devices can be more or less difficult depending on the API.

0


source







All Articles