Hi!
My problem is that I want to know the preferred sample rate for the soundcard (on Windows 8, in a Windows Store app).
I'm a NAudio newbie, so please bear with me - I have searched the net and the source code and still don't know how this should be done.
My experiments are related to sound generation (I started out here: http://mark-dot-net.blogspot.se/2009/10/playback-of-sine-wave-in-naudio.html ), and I have discovered that if I use an inappropriate sample rate there is a latency of one second. I have asked a few questions in the blog post I mentioned, and one suggestion I got was that I could ask WasapiOut for the WaveFormat. However, I am using NAudio 1.7, the preview release of WinRT support, and there is only WasapiOutRT, which doesn't seem to have this option.
For now I have hard coded the sample rate to 48000, and it works great on my device, but I'd like the code to work on other machines as well.
Does anyone have an idea of how to do this?
Best regards,
Håkan
My problem is that I want to know the preferred sample rate for the soundcard (on Windows 8, in a Windows Store app).
I'm a NAudio newbie, so please bear with me - I have searched the net and the source code and still don't know how this should be done.
My experiments are related to sound generation (I started out here: http://mark-dot-net.blogspot.se/2009/10/playback-of-sine-wave-in-naudio.html ), and I have discovered that if I use an inappropriate sample rate there is a latency of one second. I have asked a few questions in the blog post I mentioned, and one suggestion I got was that I could ask WasapiOut for the WaveFormat. However, I am using NAudio 1.7, the preview release of WinRT support, and there is only WasapiOutRT, which doesn't seem to have this option.
For now I have hard coded the sample rate to 48000, and it works great on my device, but I'd like the code to work on other machines as well.
Does anyone have an idea of how to do this?
Best regards,
Håkan