hiro wrote:Yes, that's true, I can hear 20kHz, but libsamplerate doesn't create any audible distortions for me. Perhaps I have to practice this a little more?
Well, I did practice and test some more and I learned something at least. I compared these 4 configurations:
- qmmp->jack->alsa->good external firewire soundcard
- mpg123->oss->spdif out from a cheap intel hd soundchip to good dac
- mpg123->alsa->the analog output of the roland sh-201 synthesizer
- last and least: mpg123->oss->intel hd analog audio output
The first two sounded exactly the same when I had their loudnesses balanced.
But that sh-201 sound stood out a lot in that comparison. Lack of dynamics in both sh-201's and intel hd's analog output and even distortions in the latter (probably my fault: but ossmix had to much options for me to bother).
Alsa is probably doing linear resampling again, this could also explain the big differences. I was careful to use the same sample rates though...
In contrast to these easily audible differences libsamplerate didn't create any differences.
For me the case is simple: For playing music I will use my firewire soundcard with jack in 44.1 kHz, so that quality's bottleneck is in the source. I guess I will have to create my own music in 24bit if I want more dynamics.
How high are your observed frequencies and how much over the noise floor did they really get?
Hi hiro!
I do not think that it is a good idea to mix everything together, for it may lead to a further confusion.
1. ALSA is incomprehensible. If a linear resampler is involved, it may play "bad clipping" with Risset Bell. However, if you hear "bad clipping" with ALSA, it might be caused by many other factors.
2. All your players do not seem to be reliable, they may distort sound themselves
http://4front-tech.com/hannublog/?page_id=34MPlayer, for example, has an own resampler inside (it is not so easy to disable it with ALSA). Other players may have a resampler as well.
There is a resampler inside "libav", which is said to be impossible to disable without "esoteric techniques".
Edit: Your players may also contain filters, equalizers, and other things, which may distort sound.
3. spdif is not exact
http://en.wikipedia.org/wiki/S/PDIF4. For testing sound quality, I use ossplay and Petrov's standalone player (pcm_play).
5. Different soundcards emphasize distortions in different way.
6. "Fast" resampler of OSS4 produces "bad clipping" with Risset Bell. It may also produce "noise" and anything else, and other OSS4 resamplers may also produce a kind of noise. Why not?
7. To understand something, we have to create special "laboratory conditions" by removing all unwanted sources of distortions and uncertainty.
Let us try a simple experiment.
1. You may take a lossless recording, something like Carlo Farina's
Le Sonate, or
Le Chant des Templiers (Ensemble Organum), or something else of the sort.
2. You may convert them with different resamplers (libsamplerate, Petrov's coverter, etc.), and play them with "ossplay -R" and/or ossplay with "Production quality" (44100 → 48000).
3. You may play them with ordinary Intel HDA soundcard (ensure that resampling is disabled, if necessary).
4. You may try to notice "nuances".
You see, the algorithms in questions are based on different principles, they are
essentially different, especially in processing "nuances".
NOTE: Petrov's resampler can also convert 16bit → 32bit, it may make a difference for Intel HDA. It can also convert stereo → surround.
In any case, run "ossinfo -a -v9" first, it will tell you which formats are supported.
------------------
Edit: You should not forget, however, that the ancient algorithm of resampling (e.g. libsamplerate, "Production quality", etc.) involves a kind of filtering (
sic!) The filter might be more or less exact, but, in any case, your sound is already filtered, sterilized, it is, in fact, a kind of ersatz sound. If you have an ideal soundcard, you may believe that sound is "natural", but it cannot be natural, by definition. Is it possible to produce "natural coffee" from acorns? If sound is already processed with libsamplerate, it can hardly by made natural by the most expensive soundcard.
The information theory is still valid, and it tells you something like this:
In practice, neither of the two statements of the sampling theorem described above can be completely satisfied, and neither can the reconstruction formula be precisely implemented. The reconstruction process that involves scaled and delayed sinc functions can be described as ideal. It cannot be realized in practice...
and so on and on; and also "low pass filter", but "in practice, a signal can never be perfectly bandlimited, since ideal "brick-wall" filters cannot be realized". Read more here:
http://en.wikipedia.org/wiki/Nyquist%E2 ... iderationsIf to translate all these into an ordinary human language, the ancient resampling algorithm is not suitable for resampling "lossless audio", simply because it transforms "lossless" into "lossy". It was a CD, or FLAC, and now you have a kind of ogg, or mp3, and you seem to be ready to believe that everything is O.K. If your soundcard has an internal HW resampler inside, it is likely to be of the same sort. And what about high frequencies? It depends on how that "low pass filter" was designed.