3

I want to write a program which allows users to play sound clips into their microphone (recording device) so that they can mix in clips with their voice while using VOIP software (Ventrillo or Skype for example) from their PC. When I say play sound clips into their microphone, I mean the user presses a button, and the sound clip is played that both the user and the people on the other end of the VOIP connection can hear. What API functions can be used to do this on Windows?

Roman R.
  • 68,205
  • 6
  • 94
  • 158
sysrpl
  • 1,559
  • 3
  • 15
  • 24

1 Answers1

0

There is no standard API to "play sound into microphone". That is, when applications want to capture audio and they use API to obtain the audio feed, there is no standard way defined to hook into this process and update the captured audio on the fly. To add to this, there are several audio APIs out there with substantial differences.

Playing sound to playback device is thus easy and is a typical audio API task, which does not even deserve special attention in the context of this question. Altering captured audio feed is typically a task for the capturing application. As soon as it has captured data, the application is free to modify it, in particular mixing additional feed into it.

Now if your request is to alter behavior of a third party audio-enabled application such as Skype, having no way to hook into audio pipeline directly you would typically want to implement a virtual audio capture device which generated the feed on its own with the flexibility to mix real captured data and additional content. If the third party application is set to record from such virtual device, it starts taking data from - effectively - your device/component directly. The task of creating virtual audio devices is complicated by the fact that multiple APIs exist and various applications use different APIs to capture audio, creating virtual devices might be more or less difficult depending on API.

Roman R.
  • 68,205
  • 6
  • 94
  • 158