Getting real / physical / hardware samplig rate of sound card
-
2012年4月13日 下午 10:49
I need to get real / physical / hardware (don't know the word) samplig rate of my soundcard. I'm generating High frequency square sound wave and playing it using DirectSound.
I need to match DirectSound sampling rate with the sound-card. I don't want windows mixer to re sample my sound because output wave will be totally unusable.
In short: How to get sound-card native sample rate?- 已移動 Helen Zhao 2012年4月16日 上午 06:37 (From:Visual C++ General)
所有回覆
-
2012年4月14日 上午 11:12
You could use waveOutGetDevCaps (or waveInGetDevCaps if you want to sample signals ofer i.e. microphone). This functions will show you the supported sampling rates of your sound card.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743841%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743857%28v=vs.85%29.aspx
-
2012年4月14日 下午 05:57
You could use waveOutGetDevCaps (or waveInGetDevCaps if you want to sample signals ofer i.e. microphone). This functions will show you the supported sampling rates of your sound card.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743841%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743857%28v=vs.85%29.aspx
This is nice.
But there is problem.
My sound card supports 44.1k/48k/96k/192kHz but those functions return me all flags. 11025, 22050 also.Second thing. I can't find flag for 192kHz.
Is there other way?
-
2012年4月16日 上午 06:37
Hi H180,
According to the description, I’d like to move this thread to "Windows Hardware WDK and Driver Development" forum for better support.
Thanks for your understanding.
Best regards,
Helen Zhao [MSFT]
MSDN Community Support | Feedback to us
-
2012年4月16日 下午 04:18擁有者Helen, please move it back. this has nothing to do with writing a driver, rather user mode APIs on top of sound cards
d -- This posting is provided "AS IS" with no warranties, and confers no rights.

