>> renice -20 -p `pgrep mpd`
>>
>> but my Athlon 2.2Ghz still can't handle it for more than a few
>> seconds.  I don't have SMP enabled because of a bug in madwifi, and
>> I'm hoping when I get that fixed I'll be able to run the best
>> libsamplerate resampler.  Any other ideas for making this work?
>
> AFAIK resampling is expensive operation that's only necessary when your
> sound card can't handle native stream sample rate, furthermore, it's a
> lossy operation (degrading quality).
>
> So, I'd look for the answer to the question "why mpd is doing it and
> why I allow it to do that?".
> For example, you might have enabled it to resample stream to 32 bits
> depth, while your built-in card can only handle 16 and the stream has
> also 16, so what happens is userspace-level conversion (with some loss
> of quality) to 32, loading your CPU, then this stream goes to alsa,
> and, provided that your card can't play this, driver or the card itself
> converts it back to 16.
> Note that the latter case would probably mean "card offloads conversion
> to your CPU as well", so you'll get CPU load for both ways' conversion
> anyway, only reducing sound quality, no matter how good converters are.
>
> To avoid any processing, try disabling resampling in mpd, since it'll
> probably be done for you anyway, if necessary (you'll hear "white
> noise" otherwise).
>
> And you can pre-convert all the streams to any given samplerate, but
> note that you'll probably get far worse results if the target format
> isn't lossless (flac, ape), even if the source one is lossy, than with
> worst resampling.
> And you can get worse CPU/IO load with lossless format in the end,
> since it's harder to decode and the input data stream is much heavier
> than with lossy mp3s or oggs.
>
> --
> Mike Kazantsev // fraggod.net

I'm upsampling my 16/44.1 files to 24/96 because it sounds much better
than letting the USB DAC do it.  This was actually recommended by the
manufacturer and it sounds much better.

Pre-converting sounds interesting.  I could convert all of my 16/44.1
files to 24/96 files?  That way the CPU wouldn't be stressed at
playback time.  How can I do that?  I use libsamplerate "Best" for
resampling.

- Grant

Reply via email to