Sample Rate Conversion

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
All operating systems can do sample rate conversion.
The reason is obvious.
A sound card can play only at 1 rate at the time (the rate of the clock driving the DAC).
If you have multiple streams e.g. playing audio and a system beep, both must have the same sample rate to be playable at the same time.
Another reason to re-sample is that the source has a sample rate not supported by the hardware
E.g. you downloaded 24 bit/ 192 kHz audio and your sound card supports 16 bits/ 48 kHz max.

Sound quality
Sample rate conversion shouldn’t affect sound quality.
But writing a good SRC is not trivial.
In practice it can generate audible artifacts.

Famous is the XP K-mixer. You can find tons of complains about it on the internet.

Benchmark Media provides an example of the impact of sample rate conversion in OSX 10.4.6

A 16-bit 10k sine wave played through iTunes on OSX 10.4.6, without any sample-rate conversion.


A 16-bit 10k sine wave played through iTunes on OSX 10.4.6, with sample-rate conversion from 48 kHz to 44.1 kHz.
The distortion seen in this graph is solely caused by sample-rate converting from 48 kHz to 44.1 kHz. As seen in the graph, the signal-to-noise ratio went from 130 dB to less then 80 dB!
Apples own K-mixer.

dCS measured the up sampling in Vista from 44 to 96.

The dark line is the original 16/44.1 signal.
Obvious Vista SRC generates artifacts.

Solutions

Both Win7 and OSX have a preference panel where you can set the sample rate.
If the source differs from this rate, it will be re-sampled.

A first an obvious one it to fool around a little with the SRC of your operating system.
Play Redbook audio (44.1 kHz) and try a couple of settings like 48, 88 and 96 (if your hard ware supports this).
Download a hi-res track e.g. 24/96 or 24/176 and try various down sampling rates.
If you don’t hear a difference, stop bothering.

If your collection is 44.1 only (CD, MP3) you might simply set the OS to 44.1 kHz.

No sample rate conversion
A simple trick is to configure you're system in such a way that no re-sampling will take place.
In Win7 this can be done using the WASAPI interface.
In OSX you need a third party program like Pure Music.
Of course this only works as long as the hard ware supports the formats you provide.
Playing your audio at its native sample rate is probably the best solution.
 

Scott Borduin

WBF Technical Expert (Software)
Jan 22, 2011
56
0
0
Portland, OR area
???

Amir, does that graph from DCS look right? IIRC, I thought Vista had a lot of attention put on the SRC algorithms ...
 

garylkoh

WBF Technical Expert (Speakers & Audio Equipment)
Sep 6, 2010
5,599
225
1,190
Seattle, WA
www.genesisloudspeakers.com
Hi Vincent, talking about Sample Rate Conversions, have you tried the SoX freeware sample rate converter for Foobar? Looking at the comparisons on src.infinitewave.ca it looks really good. Instead of letting the internal SRC on Windows do it, I use SoX on Foobar to re-sample to the native rate of whatever DAC I am using. Seems to make some really cheap DACs and interfaces sound pretty good.
 

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
I use J River all of the time.
Have it set to WASAPI so all is played at its native sample rate.
In practice for me it is a non-issue as almost all of my audio is 44.1
 

microstrip

VIP/Donor
May 30, 2010
20,807
4,700
2,790
Portugal
As far as I understand you are just addressing real-time sample rate converters for real time playback and the referred problems are most probably due to bad algorithms or lack of computing power to perform the conversion. Are there higher quality programs to re-sample adequately the file recordings off line?
 

untangle

New Member
Mar 11, 2011
61
0
0
Santa Clara, CA
baasnotes.com
As far as I understand you are just addressing real-time sample rate converters for real time playback and the referred problems are most probably due to bad algorithms or lack of computing power to perform the conversion. Are there higher quality programs to re-sample adequately the file recordings off line?

Sure there are. Izotope and Weiss both have solid offerings.

But I disagree with the notion that SRC is impossible or even undesirable in real time.

Bob
 

Bruce B

WBF Founding Member, Pro Audio Production Member
Apr 25, 2010
7,007
515
1,740
Snohomish, WA
www.pugetsoundstudios.com
Are there higher quality programs to re-sample adequately the file recordings off line?

If you want the best, it's Weiss SARACON. There are several others that do an awesome job, such as Izotope.

I have not found a realtime SRC that worked with odd integer streaming. .... None.. I have even tried HW converters that can't do it.

Even integer conversion is easy for software and hw converters.
 

untangle

New Member
Mar 11, 2011
61
0
0
Santa Clara, CA
baasnotes.com
I have not found a realtime SRC that worked with odd integer streaming. .... None.. I have even tried HW converters that can't do it.

Even integer conversion is easy for software and hw converters.

Bruce, I don't understand what you mean here.

Do you mean "don't work at all" or "don't sound good"?

And by "odd integer streaming" do you mean "SRC other than freq doubling/halving" (e.g., 48->96)?

Thanks,

Bob
 

Bruce B

WBF Founding Member, Pro Audio Production Member
Apr 25, 2010
7,007
515
1,740
Snohomish, WA
www.pugetsoundstudios.com
Bruce, I don't understand what you mean here.

Do you mean "don't work at all" or "don't sound good"?

And by "odd integer streaming" do you mean "SRC other than freq doubling/halving" (e.g., 48->96)?
Thanks,
Bob

Yes, odd integer streaming like DSD => 24/96 or 192 => 88.2

and doing off-line odd integer conversions like SACD to 24/96 does not sound good. You can't do it with hw because you have 2 different clocks that don't match.
 

untangle

New Member
Mar 11, 2011
61
0
0
Santa Clara, CA
baasnotes.com
Gotcha - I just wanted to be sure.

While I found this to be the case two years ago, I no longer do. IMO, realtime SRC has made great bounds, at least in software. I use it regularly.

In fact, there's a rather large segment of Mac-based audiophiles who set their player (e.g., Pure Music) to 176 or 192 and leave it there.

In addition, cutting edge jitter rejection circuits in DAC's like the Anedio D1 use SRC organically.

Of course, your listening skills are probably sharper than mine given your trade, so you are likely perceiving things that are beyond my capability.

Bob
 

About us

  • What’s Best Forum is THE forum for high end audio, product reviews, advice and sharing experiences on the best of everything else. This is THE place where audiophiles and audio companies discuss vintage, contemporary and new audio products, music servers, music streamers, computer audio, digital-to-analog converters, turntables, phono stages, cartridges, reel-to-reel tape machines, speakers, headphones and tube and solid-state amplification. Founded in 2010 What’s Best Forum invites intelligent and courteous people of all interests and backgrounds to describe and discuss the best of everything. From beginners to life-long hobbyists to industry professionals, we enjoy learning about new things and meeting new people, and participating in spirited debates.

Quick Navigation

User Menu

Steve Williams
Site Founder | Site Owner | Administrator
Ron Resnick
Site Co-Owner | Administrator
Julian (The Fixer)
Website Build | Marketing Managersing