WaveOutWindow - changing output device

Feb 7, 2015 at 6:38 PM
Hello!
Please help me how I can change the output device for my WindowsForm using Window handle?
My code:
private void OnHandleCreated(object sender, EventArgs eventArgs)
        {
            WaveOutWindow wOutWnd = new WaveOutWindow(Handle);
            wOutWnd.Device = 2; //I have device by this number
        }
But it has no effect. My form use default audio device for output.
Coordinator
Feb 9, 2015 at 3:22 PM
Is there any particular reason for using WaveOut? I am going to have a look at it but anyway... WaveOut got marked as obsolete. I would recommend you to use WasapiOut or DirectSoundOut.
Feb 10, 2015 at 12:53 PM
I don't encounter any issues with that. May your audio driver refuses to switch the output device. I'm currently on an asus laptop and I need to change to output device via the build in driver gui manually.
Feb 14, 2015 at 7:01 AM
Thanks for answers. But my problem is not solved.
My global task is as follows: i want to intercept sounds from others applications, which can play mediacontent (WindowForm with WebBrowser component, for example). And when apps play sound, i want intercept it and filter sound threads by applications. Similar functionality implements the program CheVolume . My concrete problem in filtering sound threads by applications. I guess that this functionality must be released using wasapi or directshow technologies, but don't understand, how.
Coordinator
Feb 14, 2015 at 8:27 AM
Well as far as i know, with pure windows api, this is currently not possible. I'm sorry. CSCore currently does not provide any possiblity to do that.
Marked as answer by filoe on 2/19/2015 at 3:28 PM