Reputation: 232
I have a simple sample mixer, when profiling I noticed that ~40-50% of the time is being spent resampling (44.1 => 48kHz, they must do something more sophisticated than lerp).
This step is gone when I open the playback device (DSound in my case) in 48kHz mode.
Question is: is there a way to query audio driver's default (native) sample rate to avoid resampling?
I tried searching the web/docs but found nothing, I thought this might be a simple API call.
Thanks.
Upvotes: 1
Views: 1448
Reputation: 156
In case you are still curious, I had the same question and had trouble finding answers. Someone pointed me in the right direction, and I was able to get a working code example for getting playback properties (Win >= Vista). You can only do this in Windows higher than XP, but that is where resampling from 44.1 to 48 can sound bad (XP had better default resampling). How do you get the current sample rate of Windows audio playback?
Upvotes: 2