[pulseaudio-tickets] [PulseAudio] #262: Pulseaudio should switch sample rates when possible

PulseAudio trac-noreply at tango.0pointer.de
Mon May 5 14:54:00 PDT 2008


#262: Pulseaudio should switch sample rates when possible
----------------------+-----------------------------------------------------
  Reporter:  Florob   |       Owner:  lennart
      Type:  defect   |      Status:  closed 
  Priority:  normal   |   Milestone:         
 Component:  daemon   |    Severity:  normal 
Resolution:  wontfix  |    Keywords:         
----------------------+-----------------------------------------------------
Comment (by lennart):

 Dude, we ask ALSA for a 44100hz by default, and also ask it to not give us
 anything that is not native to the hardware. Then, we take whatever ALSA
 gives us, which might be different from 44100hz. Could be 48khz or
 whatever.

 What I was referring to is that we won't do on-the-fly sample rate
 switching. You are always welcome to configure PA via default-sample-rate=
 option in daemon.conf to a different sampling rate.

 But again: PA will *not* default to any "artificial" sampling rate. We try
 our best to convince ALSA to hand us only *native* sampling rates.

 Florob: Resampling won't cause you stuttering music. Not on any hardware
 that is newer than 10 years. However, if we'd switch sampling rates all
 the times when a new client connects and requests a different rate and
 have to close and reopen the audio device for that then you would
 certainly hear that as nasty drop outs. Just think of this case: you play
 two streams at the same time. First you start one with 8khz sampling rate.
 When it is half way through you start one at 44khz. In the world you are
 requesting we'd first open the audio device in 8khz and as soon as the
 second stream starts to close it and reopen it in 44khz. You will
 certainly hear that, the first stream will be interrupted for a short
 time! So in short: what you are requesting will cause bad sound quality.

 In summary, what you guys are requesting doesn't make sense.

 In PA 0.9.11 we will probably ship an SSE optimized version of the Speex
 resampler. Then you probably won't be able to even notice the CPU load.
 I'll then also change the default sampling rate to 48khz, which is what
 dmix did already.

-- 
Ticket URL: <http://www.pulseaudio.org/ticket/262#comment:4>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list