0

I'm wanting to create a fun little project to function as a Skype sound-board. That is to say, if you press a hotkey (say, NumPad 1), the sound-board plays a pre-determined WAV file over the call. Really only to be used for stupid in-jokes and other silliness with friends.

The way I envision handling this problem is writing to the microphone's output buffer. However, I cannot find any ideas on how to do this. I found this question regarding general audio handling, but the output examples for nAudio are rather generic and don't handle writing to a specific device.

Ideally, I want to get the default audio input device for the system (so the default microphone) and then write the WAV data to the buffer it's using for transmission.

The first problem appears to be tenable with the XNA framework and its Microphone object. It has a Default static method that should get me what I need. But the Microphone object itself doesn't have an obvious way to write to the buffer, which leaves me a little stuck.

Are there any ideas on how to do this? Am I running down the wrong path? Is the Microphone object even the correct thing to use here?

Community
  • 1
  • 1
tmesser
  • 7,558
  • 2
  • 26
  • 38
  • 1
    XNA is probably the wrong technology for that. Modifying microphone output seems to be hard to impossible. I could imagine that you have luck with a software driver that emulates another sound input device. This driver would mix the microphone output and the WAV files. I am the wrong person to ask about driver development, but this all seems like a lot of work for just some jokes. Maybe someone has already implemented that. I once stumbled upon a program that did this for cameras. – Nico Schertler Mar 27 '15 at 21:04
  • 1
    You might have better luck with the _[DirectShow](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375454%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)_ API from Microsoft. _[Using DirectShow, your applications can perform high-quality video and **audio playback or capture**](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375454%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)_ –  Mar 27 '15 at 22:55

0 Answers0