HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: Na svyazi on 2012-12-18 20:46:57

Title: Virtual sound card for sample rate conversion ?
Post by: Na svyazi on 2012-12-18 20:46:57
I need a virtual sound card driver to be able to convert sample rate of audio from 44100 to 48000 with high quality.

My sound card (SB Audigy 2) does sample rate conversion with very small FFT size and it reduces sound quality. All internal processing in the card is done in 48000 or 96000. I get very high intermodulation distortion when I playback audio in 44100.

The idea is to use a virtual sound card driver that is able to convert any sample rate including 44100 to a pre defined sample rate (48000 or 96000) in realtime. The virtual sound card should provide very high sample rate conversion quality.

I mean that I am going to playback audio to the virtual sound card driver which converts 44100 to 96000 with high quality and sends converted audio to SB Audigy 2 (or any other card).
At this moment I only use software resampling plugin for Winamp which does the same thing only within Winamp playback. I know that Foobar player does the same conversion internally and outputs a user defined sample rate. But there are very many players that are unable to do any resampling (for example flash plugin for web browsers). I am looking for a solution at system level for high quality sample rate conversion. Virtual sound card looks like a good option to do that.

Does any solution to do that conversion exist?
Do you know of any virtual sound cards capable of sample rate conversion ?
What would you recommend?
Title: Virtual sound card for sample rate conversion ?
Post by: Dynamic on 2012-12-19 01:53:55
It sounds as though you're on Windows but haven't told us which version.

Since XP at least there have been ways to change Windows Mixer's resampler to ensure it resamples at Best Quality and supplies 48000, if I recall correctly. I did that on an old XP machine and this I was able (with caution not to fry any tweeters) to pass the udial.wav test. Try right clicking on the volume control and looking through the options, particularly in the area that offers speaker or headphone optimisation.

That way it will handle everything well without needing a virtual driver so long as you don't bypass the mixer.
Title: Virtual sound card for sample rate conversion ?
Post by: icstm on 2012-12-19 10:09:56
Yes, the standard windows mixer allows for this.
In Win7 just set the playback device setting to sample at 48k (48 or 96 are normally the default, so it is suprising that you are getting 44.1, unless you told foobar or winamp to output based on source music (which is often 44.1)
Title: Virtual sound card for sample rate conversion ?
Post by: Na svyazi on 2012-12-19 10:26:26
I use Win XP and there is no official way you can set output sample rate in windows mixer. Additionally XP mixer conversion quality is questionable. With DerectSound output (which is the preferable output method) this conversion is not possible at all.

Regarding Windows7 I've heard that sample rate conversion quality in windows mixer is poor too. Do you agree with that?
Title: Virtual sound card for sample rate conversion ?
Post by: Na svyazi on 2012-12-19 11:34:52
To illustrate what I'm talking about here are my test results:
The first result is 48000 playback/recording which produces very small amount of IMD distortion.
The second result is pure 44100 playback/recording. You can see 3.6% IMD distortion. Such a playback sounds terrible.
The third result is made in a tricky way. Actually it is 44100 playback/recording in RMAA. But I played an empty audio file in an audio player at 48000. This tricked the windows mixer to resample 44100 to 48000 in software mode (the mixer resamples to the highest sampling rate of any audio stream playing). This gave me sample rate conversion in Windows mixer.
(http://oi50.tinypic.com/2vkfeie.jpg)
Actually these results of windows mixer sample rate conversion are better but not perfect. This kind of resampling produces slight frequency response change, lower dynamic range, slightly more distortion than pure 48000 playback.
Based on these results I assume that high quality sample rate conversion in a virtual sound card is more preferable than the use of windows mixer to convert sample rate.
Title: Virtual sound card for sample rate conversion ?
Post by: Dynamic on 2012-12-19 17:51:53
The third column looks like good quality, transparent set of figures, but are you saying Windows mixer doesn't automatically resample to 48 kHz?

This is the settings dialogue I used on my Windows XP machine to choose Best Quality resampler in case that's any guidance to you, though I hardly ever use that machine to play audio.

(http://i.imgur.com/3Y8sv.png)
Title: Virtual sound card for sample rate conversion ?
Post by: Na svyazi on 2012-12-20 20:27:59
The third column looks like good quality, transparent set of figures, but are you saying Windows mixer doesn't automatically resample to 48 kHz?

That's correct for Win XP. The mixer converts sampling rate of all audio streams to the highest sampling rate of any audio stream playing at the moment.

The "Sampling rate conversion quality" setting doesn't affect sampling rate. It only affects conversion quality and CPU load required for the conversion.

I tried Virtual Audio Cable software to act as a virtual sound card for sample rate conversion. The software developer claims it can do any sample rate conversion. It can accept any sample rate and output the processed signal at the required sample rate to the sound card.
I spent a lot of time testing Virtual Sound Cable last night. The conversion quality within the program appeared to be very poor. I got unbelievably high IMD distortion reaching 30%. So it's not suitable for sample rate conversion at all.

The other approach to quality conversion is to set Win XP mixer to resample all sounds to 48000 with a trick by playing a silent audio stream at 48000 all the time.
Do you know a small program which can play a silent continuous audio stream?
Title: Virtual sound card for sample rate conversion ?
Post by: pdq on 2012-12-20 21:03:08
How expensive is it to just replace your sound card with one that does a better job of resampling?