Am Dienstag, den 20.10.2009, 16:38 +0200 schrieb Lennart Poettering:
> On Tue, 20.10.09 12:24, Alexey Fisher ([email protected]) wrote:
> 
> > Hallo,
> > 
> > i played a bit with pa and have question:
> > I know pa will resample stream if my src use 44100Hz and my sink need
> > 16000Hz, so it take some cpu (~10%) time. Why it take so mach CPU even
> > if src and sink are same? On play back with sink=src pa almost not use
> > cpu, why on record?
> 
> No resampling should take place if source and stream sample rate
> match.  Please provide the output of "pacmd ls" which could verify
> that this is the case.

Here is the output of my record, you can see no resampling is enabled.
But it take still more CPU when playback. On playback without resmapling
pa use ~1% on record ~5%.
The command i use for record is: 
gst-launch-0.10 pulsesrc ! audio/x-raw-int,rate=44100 ! speexenc !
oggmux ! filesink location=foo.oga

1 source outputs(s) available.
    index: 15
        driver: <protocol-native.c>
        flags: START_CORKED
        state: RUNNING
        source: 1 <alsa_input.pci-0000_00_1b.0.analog-stereo>
        current latency: 0,00 ms
        requested latency: 46,00 ms
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        resample method: (null)
        owner module: 8
        client: 50 <gst-launch-0.10>
        properties:
                media.name = "Record Stream"
                application.name = "gst-launch-0.10"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "16"
                application.process.id = "4112"
                application.process.user = "lex"
                application.process.host = "mini"
                application.process.binary = "gst-launch-0.10"
                application.language = "de_DE.UTF-8"
                window.x11.display = ":0.0"
                application.process.machine_id =
"e0f90296c911e9435b8cf1864ac71e18"
                application.process.session_id =
"e0f90296c911e9435b8cf1864ac71e18-1256038634.681669-592114388"
                module-stream-restore.id =
"source-output-by-application-name:gst-launch-0.10"

> > And one more question: are there any way to have multiple default rates?
> > My sound card support 32000,44100,48000 ... and i think it's really sad
> > if pa resample 48000 down to 44100.. it's more about cpu, not quality.
> 
> This doesn't fly, see my explanations here:
> 
> https://tango.0pointer.de/pipermail/pulseaudio-discuss/2009-October/005194.html
> 
> Lennart
> 
Thank you, the answer was clear. 
Now i need to test what is cheaper: to reasample by pa or by aplication.

Alexey

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to