This project has moved and is read-only. For the latest updates, please go here.

Playback capture MMDevice to an specific render device

Jan 30, 2013 at 5:05 AM

Is there a way to change the playback device of a MMDevice?

 

I know there is a hacky way to change the DEFAULT playback device, but I only want to hear (for example, a input line coming from a turntable) to a specific  audio output.

Same way is done in this window 

 

Hope you can help me

Regards
JLuis 

Jan 30, 2013 at 9:18 AM

to monitor an input you'd need to record sound from that input (WasapiIn) and play it to the output (WasapiOut).

Jan 30, 2013 at 4:38 PM

Kind of a bit redundant :S

And what would be the process? I hope you can help me a bit because Im sort of lost in here:

 

var waveIn = new WasapiCapture(inputDevice);

var waveOut = new WasapiOut(outputDevice, Shared, true, 150);

//What object do I need to create to provide a IWaveProvider for it Init method of waveOut?

 

Hope you can help me with this

Regards

JLuis

Jan 31, 2013 at 7:39 AM
you can use the BufferedWaveProvider for this. When you recieve audio from the capture device, write it into the BufferedWaveProvider. The player can just read continually from BufferedWaveProvider.
Feb 1, 2013 at 6:24 PM
Hi

I tested the BufferedWaveProvider and worked like a charm, but I facing a strange issue: now I hear the stream in 2 different output devices (speakers and headphones (headphones is my default playback device).

Any recommendation to really switch the monitoring device rather than just duplicate it?

Regards

JLuis
Feb 4, 2013 at 11:10 AM
You'd have to ask someone who knows the CoreAudio API really well. Perhaps there is a way of getting and setting that "Listen to this device" property.

Mark
Feb 4, 2013 at 4:55 PM
I will search for a solution and I will post it here when I found it

Thanks for all