0

I am making my game engine in c# (OpenTK and Naudio). I bought another monitor and now i have 3 audio outputs. My heaphones are set as the main ones but naudio just sends audio to my monitor, even when I do this:

Wave.DeviceNumber = -1;

The audio just comes out of my monitor I am just playing an waveout with volume control and, when mono, panning control.

PS: I am compiling for windows 10. And this is my github issue : https://github.com/naudio/NAudio/issues/283

  • maybe this https://stackoverflow.com/questions/26077907/get-default-output-audio-device-with-naudio is what you are looking for – Jonathan Dec 27 '17 at 11:09
  • I guess you can use ```MMDeviceEnumerator.GetDevice()``` to get the identifier of the default media playback device and use that in wave but honestly I don't know – Jonathan Dec 27 '17 at 11:12
  • but dont i need an int to do this: wave.DeviceNumber = int – A cool programmer Dec 27 '17 at 11:12
  • Yes and the MMDeviceEnumerator will give you an int. Have you checked the content of WaveOut.DeviceCount to know if it even recognizes the other outputs you have besides the monitor? – Jonathan Dec 27 '17 at 11:16
  • i am just a noob in audio. I worked with windows audio core api. How do I play a wave in a certain device – A cool programmer Dec 27 '17 at 11:19
  • Sorry, I'm not your man. I'm a rookie in audio stuff, too. I hope someone else will help you. – Jonathan Dec 27 '17 at 11:25
  • i tried and even windows audio player (bundled with .NET) just works on the speakers – A cool programmer Dec 27 '17 at 12:12

0 Answers0