• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Offler

Senior Member
Joined
May 27, 2021
Messages
414
Likes
399
Is there something about going the other way? Namely downsampling when I play a movie with 48 Khz and my Windows is set to 44,1 Khz. Since Windows "upsampling" is just repeat bit it seems, is downsampling just dropping bits?
These are two sine waves at 18000 and 19500Hz, generated at 48KHz (Float) sampling rate, output over 44.1 24bits.

imd05.jpg


and for comparison 48KHz signal on 48KHz output looks like this:
imd06.jpg

At least on my system conversion from 48>44KHz creates worst intermodulation distortion among other scenarios. Best result was at 192KHz output.
 

Sokel

Master Contributor
Joined
Sep 8, 2021
Messages
5,840
Likes
5,768
These are two sine waves at 18000 and 19500Hz, generated at 48KHz (Float) sampling rate, output over 44.1 24bits.

View attachment 220328

and for comparison 48KHz signal on 48KHz output looks like this:
View attachment 220329
At least on my system conversion from 48>44KHz creates worst intermodulation distortion among other scenarios. Best result was at 192KHz output.
Probably that's the reason SoX in foobar has the mods (mod-mod2) so you can set the two families of 44.1-48 accordingly.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
These are two sine waves at 18000 and 19500Hz, generated at 48KHz (Float) sampling rate, output over 44.1 24bits.

View attachment 220328

and for comparison 48KHz signal on 48KHz output looks like this:
View attachment 220329
At least on my system conversion from 48>44KHz creates worst intermodulation distortion among other scenarios. Best result was at 192KHz output.
So I see your device name has "Realtek", looks like the Realtek driver worsened the results, artifacts in audible range is around 70dB below the real signal?

Here is my "High Definition Audio Device", ALC897, and my older board with ALC892 was also better than yours (ALC1200/1220?)

48k file played with Windows mixer set to 48k:
48-48.png



48k file played with Windows mixer set to 44k. Artifacts level obviously lower than yours. More than 90dB of suppression below the 18k tone.
44-48.png


For completeness, here is the same signal generated at 44.1k, and played by the ALC897 with Windows mixer set to 48k. Even lower distortion even when sample rate is not matched.
44-48.png


All files are played in the way below, without additional resampling:
mpc-hc.png
 
Last edited:

Offler

Senior Member
Joined
May 27, 2021
Messages
414
Likes
399
So I see your device name has "Realtek", looks like the Realtek driver worsened the results, artifacts in audible range is around 70dB below the real signal?

Here is my "High Definition Audio Device", ALC897, and my older board with ALC892 was also better than yours (ALC1200/1220?)

Its ALC 1220, used over optical SPDIF. Driver practically acts just as a transport - no filters should be active on SPIDF path.

The measurement software I used is 'audt30d' and its measured from headphone output on my d3020v2.

The measurement sw i use is bad - it just helps me to confirm concepts people here are aware of. But also keep in mind that my output was on 24bits, yours on 32. That cuts some of the artifacts.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
But also keep in mind that my output was on 24bits, yours on 32. That cuts some of the artifacts.
If you meant the "32-bit" in the status bar of Audition, it is just an Audition specific thing. It always show "32-bit" when the recording bit-depth is above 16.
Here is how it looks like with 16-bit playback and recording. Noise floor is slightly higher, but distortion level remains the same (second screenshot in my previous post)
16-bit.png
 

anphex

Addicted to Fun and Learning
Forum Donor
Joined
May 14, 2021
Messages
662
Likes
870
Location
Berlin, Germany
So what's the cause? Rounding errors? Dropped bits?
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
So what's the cause? Rounding errors? Dropped bits?
datasheet.png

All (most?) Realtek chips run in multiples of 48kHz internally. In the case of optical output, the external DAC will take care of this but for the Realtek's internal analog I/O there will be some conversion. So what you saw in my previous posts are in fact, Realtek's hardware resampler performance. Even if I set Windows mixer to 44k and playback a 44k file in exclusive mode, the artifacts are still there:
44-44.png


Compared to Windows resampler, with Windows mixer set to 48k but playing a 44k file:
index.php

Windows resampler's distortion level is so low that the analog recording basically cannot pick up any resampling artifact. The very uniformly spaced spikes are analog domain distortion, instead of aliasing in digital domain.
 

anphex

Addicted to Fun and Learning
Forum Donor
Joined
May 14, 2021
Messages
662
Likes
870
Location
Berlin, Germany
Oh thank you, but I meant it in a broader sense, not Realtek specific. Regarding the downsampling artifacts.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
If the resampling ratio is non-integer (e.g. 44100 -> 48000), it can be interpreted as 44100 upsampled to 160 times then downsampled to 147 times. So even when the destination sample rate is higher, if the resampler's quality is poor, the outcome will also be similar to a low quality 48kHz -> 44.1kHz conversion, like what you originally asked.

Scroll down to "Similar threads" and find the highly relevant aliasing/imaging thread. "Similar threads" is a very useful feature.
 

ichliebes

Member
Joined
Mar 28, 2022
Messages
16
Likes
4
I did a quick experiment to try to confirm this. In REW, I configured the generator for a 997 Hz -10 dBFS sine and used the REW functionality to save the generator output to a 32-bit float WAV file. I then opened that WAV file in the RTA - basically using REW to analyse its own test signal, to act as a control/reference. And then in the same RTA window I analysed the same signal but this time being played through WASAPI loopback. The two traces pretty much line up on top of each other, suggesting that the Windows audio engine pipeline is either bit-perfect or very, very close (at least up to the loopback mirroring point):

View attachment 205151

In both cases SINAD is about 136 dB which sounds about right for 32-bit float (23-bit mantissa * 6).

If I do the same at 0 dBFS then CAudioLimiter rears its ugly head as expected:

View attachment 205153



Volume doesn't really matter here, because Windows uses hardware volume control anyway for devices that support it (which is most of them). Meaning the master volume control for the device only affects the hardware volume control and has no effect on the bitstream flowing through the Windows audio engine. (Obviously this doesn't hold for per-app volume controls.)



Right. I suspect it might pass such a test though as long as the test signal doesn't get loud enough to trigger the limiter.
How did you set WASAPI loopback in REW? I would like to reproduce your test on my computer, but I can't find how to set WASAPI loopback :(

Edit: nvm. I saw the reply above about FlexASIO ;)
 

Frank2

Active Member
Joined
Sep 6, 2022
Messages
142
Likes
241
Interesting. I followed the recommendations in post #1 (put the pre-amp gain at -0,2 dB). Before that I could hear a clear difference between WASAPI shared mode and Directsound on Qobuz. Now that difference is gone. Great! Thanks!

Bh the way: you can copy the command in the config window to the clipboard (using the button labeled as such) and paste it in Config.txt. In that way the config is changed each time at startup, it seems. It also becomes visible in the edit GUI.
 

Hov

Member
Forum Donor
Joined
Mar 28, 2020
Messages
61
Likes
19
If the baseline recommendation is to run -4dB across the board, should I add that to whatever curve I'm applying? For example, the oratory curve for HD650 wants a -9.3dB pre-amp setting. Would I make it -13.3dB to "do it right" based on this thread?

Thanks for the awesome work and info here by the way. I know there are supposed to be some benefits from running exclusive mode, but having EQ access is too valuable and, I feel, overshadows and benefit of the former.
 

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
If the baseline recommendation is to run -4dB across the board, should I add that to whatever curve I'm applying? For example, the oratory curve for HD650 wants a -9.3dB pre-amp setting. Would I make it -13.3dB to "do it right" based on this thread?

Thanks for the awesome work and info here by the way. I know there are supposed to be some benefits from running exclusive mode, but having EQ access is too valuable and, I feel, overshadows and benefit of the former.
From what I understand, if you don't plan to listen to several sources simultaneously, and if you don't play badly encoded tracks (like mp3s peaking at +1.5dBF, adding a preamp of -0.2dB should be sufficient.
 

Robbo99999

Master Contributor
Forum Donor
Joined
Jan 23, 2020
Messages
6,874
Likes
6,672
Location
UK
If the baseline recommendation is to run -4dB across the board, should I add that to whatever curve I'm applying? For example, the oratory curve for HD650 wants a -9.3dB pre-amp setting. Would I make it -13.3dB to "do it right" based on this thread?

Thanks for the awesome work and info here by the way. I know there are supposed to be some benefits from running exclusive mode, but having EQ access is too valuable and, I feel, overshadows and benefit of the former.
From what I understand, if you don't plan to listen to several sources simultaneously, and if you don't play badly encoded tracks (like mp3s peaking at +1.5dBF, adding a preamp of -0.2dB should be sufficient.
Ages ago I measured a load of my tracks that I listen to in Orban Loudness Meter, and I determined that a negative preamp of -2dB would cover virtually every intersample over, not all but most, and -3dB would have covered all of them. So I run -3dB on my headphone setup as there's a lot of headroom available, and I run -2dB on my speaker setup. (I do run that in addition to the negative preamp required by the EQ, as I guess you can't be sure where in the frequency response the intersample overs are gonna occur.)
 

Grooved

Addicted to Fun and Learning
Joined
Feb 26, 2021
Messages
679
Likes
441
From what I understand, if you don't plan to listen to several sources simultaneously, and if you don't play badly encoded tracks (like mp3s peaking at +1.5dBF, adding a preamp of -0.2dB should be sufficient.
I think it's exactly at -0.18dB, but I'm not sure if true peaks enable Windows limiter. In this case, lower would be better choice, because no need to use bad mp3s to get more than 0.2dB true peaks, it happens even 24bit FLAC files
 

Robbo99999

Master Contributor
Forum Donor
Joined
Jan 23, 2020
Messages
6,874
Likes
6,672
Location
UK
I think it's exactly at -0.18dB, but I'm not sure if true peaks enable Windows limiter. In this case, lower would be better choice, because no need to use bad mp3s to get more than 0.2dB true peaks, it happens even 24bit FLAC files
Yeah, the over 2dB intersample over peaks are in lossless rips from audio CD's in my case (FLAC and ALAC) - I mean it's not the fault of the medium, it's how the track has been produced/engineered.
 

Hov

Member
Forum Donor
Joined
Mar 28, 2020
Messages
61
Likes
19
Hmm okay, thank you for the responses. If the pre-amp recommendation for an EQ curve accounts for the EQ settings, then I think I will decrease a further 3dB to be "super safe". Perhaps I'll need to start using the balanced cable with my Aune X7s (a lot of power on tap) or ensure its eventual replacement has ample headroom for the gain drop in the preamp.
 

Robbo99999

Master Contributor
Forum Donor
Joined
Jan 23, 2020
Messages
6,874
Likes
6,672
Location
UK
Hmm okay, thank you for the responses. If the pre-amp recommendation for an EQ curve accounts for the EQ settings, then I think I will decrease a further 3dB to be "super safe". Perhaps I'll need to start using the balanced cable with my Aune X7s (a lot of power on tap) or ensure its eventual replacement has ample headroom for the gain drop in the preamp.
There's probably less chance of intersample overs causing problems if you're using a negative preamp with EQ already, as only some small parts of the frequency response are close to 0dBFS in that situation....so I guess there's less chance of the intersample overs going over. I suppose to be sure you'd add that extra 3dB onto the Negative Preamp though. If you're not getting enough amplification though, then that's worse than potentially letting some intersample overs go over. If you've got enough headroom then do it, otherwise don't bother I'd say.
 

MNMLSM

Member
Joined
Apr 30, 2020
Messages
64
Likes
58
Location
Planet Earth
So, 20 months and 26 pages later :

Debate not ended :p
Indeed,
I also use EAPO with headphones and speakers.
I boost some frequencies up to +/-4dB, so ended up setting the gain on -4.2 or even -5, just to be sure. I also use foobar and every music file is scanned by ReplayGain and adds a (most of the time) negative gain to the file additionally.
When I tested the Motu M4 some time ago, I had the problem that the output was really quiet and I had to crank up the volume, on the MOTU and on my ADAM T5V, quite a lot.

For me, as a Windows user, the best solution by far would be:

- Compatibility with Equalizer APO and WASAPI exclusive or ASIO:
  • As everybody knows, EAPO settings don't work anymore as soon as an exclusive mode is used as output.
  • I know that I could also set an EQ in foobar but I don't want to change EQ every time I change between headphones and speakers.
  • With WASAPI exclusive and EAPO working together, too low volume wouldn't be a problem anymore.
- Next question would be, is using foobar with ReplayGain and additionally EAPO an overkill?
  • right now I'm using the following settings in foobar:
2022-09-21_090829.png
  • If I already use ReplayGain is there still a need to use the preamp-function in EAPO?
 
Top Bottom