Hi all,

It seems both pulseaudio alsa PCM plugin (source) and  gstreamer
pulsesrc consume much more CPU resource than alsa when working on the
same sample (rate, channel and format). I had a rough look at the source
code and found they both use the threaded mainloop model. Can we have
any chance to optimize for this?

$ arecord -Dhw:0,0 -c 2 -f S32_LE test.wav   CPU% = 1~2%
$ arecord -c 2 -f S32_LE test.wav                  CPU% = 15~18%
(default device is pulseaudio PCM plugin)
$ gst-launch alsasrc device="hw:0,0" ! queue ! audioconvert ! wavenc !
filesink location=test.wav     CPU% = 2~3% 
$ gst-launch pulsesrc ! queue ! audioconvert ! wavenc ! filesink
location=test.wav   CPU% = 12~14%

Thanks,
Bin
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to