6

Ok, my question is this:

How can I programmatically capture audio from a specific application and then send it to a specific audio device in Windows 7?

I know for a fact this can be done, since SoundLeech captures audio from individual programs, and theoretically once you have the sound you can do what you want with it (including play it to any sound output device).

I'm a C++ programmer but I know very little about Windows programming. I need some pointers to capturing sound from individual programs. I work with audio recording very frequently and I would be willing to put in a large amount of work to develop a way to better handle sound in Windows given how difficult to use it currently is.

So how can I capture audio streams directly from applications without first routing them through Virtual Audio Cables or the like?

Clonkex
  • 3,373
  • 7
  • 38
  • 55

1 Answers1

7

You cannot do it using standard user mode APIs. You need to either hook APIs or create virtual devices to accept application streams/sessions.

Community
  • 1
  • 1
Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Thanks, this is kind of answer I was looking for. I know nothing about using hook APIs - are they extremely complicated? Is this something an average C++ programmer could manage, or do I need extensive knowledge of how programs are compiled? I really don't know where to start looking, is all... – Clonkex Jul 25 '15 at 12:11
  • 2
    Hooking API is interfering into normal operation by breaking in and injecting your code between application and the API. This is what one normally does not want to do, it is generally unsafe and yes, it requires specific knowledge. Then, there are several audio APIs and hooking one does not cover apps working via other. All together this makes intercepting application audio session a complicated task (less complicated if you target specific OS, specific application, specific API). This is why regular advise is to use virtual device/audio cable and configure app to use this device directly. – Roman R. Jul 25 '15 at 13:00
  • Thanks, that's helpful :) – Clonkex Jul 26 '15 at 00:12