20 May '13 - 05:07 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Sample Rate Conversion  (Read 114 times)
Degg35
Posts: 2


« on: 9 May '13 - 16:51 »
Reply with quoteQuote

Hey,

I really like XMPlay, but it has a very small flaw that should be possible to get fixed:
Sample rate conversions from 44.1kHz to 48kHz or vice versa produce clearly audible artifacts (aliasing). Interestingly enough, even Audacity of all things has the same problem even when set to the highest SRC quality, while the VLC player has no problems whatsoever regardless of settings.
This is usually not a problem, but I really don't like the idea of resampling and re-encoding some of my stuff that is in 48kHz and in a lossy format.

Here's one of the most obvious examples. The first few seconds are resampled. https://dl.dropboxusercontent.com/u/61111963/SRC%20Artifacts%20XMPlay.flac

I hope there is an easy way to improve the SRC quality, though the fact that even Audacity has the same problem worries me a bit. Still, if VLC player can do it just fine, why can't every program?

Edit: I had an old Audacity version installed. They recently changed their SRC library to libsoxr, which should be better, but apparently the problem is still there. If I convert the file from 44 to 48 back to 44 I notice no difference anymore, but when I listen to either version with my output set to 48kHz, it still produces those artifacts. VLC still doesn't. Very strange.

Edit2: I have found the culprit. It's not the program's internal SRC. It's actually a WaveOut-related problem, even though VLC strangely enough didn't produce the artifacts even with WaveOut selected as output. After installing this fix I have no more problems: http://support.microsoft.com/kb/2653312
« Last Edit: 9 May '13 - 17:36 by Degg35 » Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 9 May '13 - 17:55 »
Reply with quoteQuote

That sounds like you may be using Windows' resampling rather than XMPlay's, or perhaps both? If you have XMPlay's resampling enabled (via the "Apply sample rate to all file formats" option), then the "Sample rate" setting should match what the soundcard output is set to in Windows' "Sound" control panel, to avoid Windows resampling too.
Logged
Degg35
Posts: 2


« Reply #2 on: 9 May '13 - 18:21 »
Reply with quoteQuote

Since I have now applied the hotfix for WaveOut and have no more issues, I can't test any additional settings. If I recall correctly, the "apply sample rate to all file formats" setting did not affect the issue whatsoever.

It's still very interesting since VLC did not cause aliasing even when WaveOut was selected, but both Audacity and XMPlay did.
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #3 on: 10 May '13 - 16:17 »
Reply with quoteQuote

This is just a guess, but it might be that VLC checked the device's sample rate and resampled the data to that rate itself, so that Windows didn't need to do any resampling (thus avoiding the resampling issue). Or perhaps its output rate happened to already match the device's rate.

If you would like to have XMPlay automatically resample to the device's rate (ie. without having to set the "Sample rate" option), you can use the WASAPI output plugin in shared mode (disable exclusive mode) to achieve that.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines