Gentoo Archives: gentoo-user

From: Mike Kazantsev <mk.fraggod@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Prioritizing mpd
Date: Sat, 13 Jun 2009 05:14:36
Message-Id: 20090613111155.6d042ee9@coercion
In Reply to: Re: [gentoo-user] Prioritizing mpd by Grant
1 On Fri, 12 Jun 2009 21:45:02 -0700
2 Grant <emailgrant@×××××.com> wrote:
3
4 > renice -20 -p `pgrep mpd`
5 >
6 > but my Athlon 2.2Ghz still can't handle it for more than a few
7 > seconds. I don't have SMP enabled because of a bug in madwifi, and
8 > I'm hoping when I get that fixed I'll be able to run the best
9 > libsamplerate resampler. Any other ideas for making this work?
10
11 AFAIK resampling is expensive operation that's only necessary when your
12 sound card can't handle native stream sample rate, furthermore, it's a
13 lossy operation (degrading quality).
14
15 So, I'd look for the answer to the question "why mpd is doing it and
16 why I allow it to do that?".
17 For example, you might have enabled it to resample stream to 32 bits
18 depth, while your built-in card can only handle 16 and the stream has
19 also 16, so what happens is userspace-level conversion (with some loss
20 of quality) to 32, loading your CPU, then this stream goes to alsa,
21 and, provided that your card can't play this, driver or the card itself
22 converts it back to 16.
23 Note that the latter case would probably mean "card offloads conversion
24 to your CPU as well", so you'll get CPU load for both ways' conversion
25 anyway, only reducing sound quality, no matter how good converters are.
26
27 To avoid any processing, try disabling resampling in mpd, since it'll
28 probably be done for you anyway, if necessary (you'll hear "white
29 noise" otherwise).
30
31 And you can pre-convert all the streams to any given samplerate, but
32 note that you'll probably get far worse results if the target format
33 isn't lossless (flac, ape), even if the source one is lossy, than with
34 worst resampling.
35 And you can get worse CPU/IO load with lossless format in the end,
36 since it's harder to decode and the input data stream is much heavier
37 than with lossy mp3s or oggs.
38
39 --
40 Mike Kazantsev // fraggod.net

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Prioritizing mpd Grant <emailgrant@×××××.com>