Bug 482932

Summary: recorded sound is defective unless PA volume control open while recording
Product: [Fedora] Fedora Reporter: James Bridge <james>
Component: gnome-mediaAssignee: Bastien Nocera <bnocera>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: bnocera
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-18 07:43:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Bridge 2009-01-28 21:19:40 UTC
Description of problem:
Sound Capture from Line-in, using Pulse Audio.
Recorded sound is broken, with bits of sound and silence alternating randomly.
However if PA volume control is open during recording, all is well.
Using PA causes CPU usage to increase, from 50% to 75%.

Version-Release number of selected component (if applicable):
gnome-sound-recorder 2.24.0.1
Pulse Audio ? All updates done.

Additional info: Hardware: 2.66GHz Celeron, Intel ICH5 

Not really a problem now I have discovered what to do, but I can't believe it's meant to work like this!

Comment 1 Bastien Nocera 2009-04-29 10:47:07 UTC
Does the same problem happen when using arecord to record the audio?

Comment 2 James Bridge 2009-04-29 22:15:44 UTC
I haven't been using the sound recorder for a couple of months but now I have tried it again, it seems to be behaving differently. The problem seems to be limited to oga recording - flac, mp3 and wav all work. Switching on Pulse Audio Volume control does still seem to help the oga problem but this effect is no longer reproducible: sometimes the recording sounds fine but more often it's broken.

arecord with -f cd works fine (but that doesn't involve ogg compression).

Comment 3 James Bridge 2009-04-30 14:24:52 UTC
Further checks: first, the version of gnome-sound-recorder on my machine hasn't changed so the problem must lie in the way things are linked up.
Second, switching on Pulse Audio VC makes the next recording (with ogg) work correctly but subsequent ones are actually worse.
Third, mp3 recording is not right, though the sound differs. In this case there are no silent bits, so no stuttering, but little bits of the input sound get omitted so that the playback 'skips' slightly, just by a fraction of a second.

Comment 4 Bastien Nocera 2009-05-05 14:11:41 UTC
Does this work:
gst-launch-0.10 pulsesrc ! audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.5 ! oggmux ! filesink location=foo.oga
And then play the "foo.oga" using ogg123?

Or this:
gst-launch-0.10 pulsesrc ! wavenc ! filesink location=foo.wav
And then playing foo.wav using paplay?

Is it the playback that's broken, or the recording itself?

Comment 5 James Bridge 2009-05-07 12:20:12 UTC
It's the recording that is broken, as is made clear by the output from the command:
$ gst-launch-0.10 pulsesrc ! audio/x-raw-float,rate=44100,channels=2 ! vorbisenc name=enc quality=0.5 ! oggmux ! filesink location=foo.oga
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough
Additional debug info:
gstbaseaudiosrc.c(807): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
dropped 5292 samples

WARNING and the following lines repeat continuously, which obviously is what creates the stuttering.

Wavenc works as it should. Could the problem lie in the extra load on the processor caused by oga encoding? If so, I don't understand why it doesn't happen every time. As I said before, it used to work reliably provided I had PA volume control open and it still does work, sometimes...

Comment 6 James Bridge 2009-05-08 10:12:47 UTC
Have just updated pulseaudio (-core-libs, PA, -libs, -utils, -module-X11, -libs-glib2, -module-gconf, -esound-compat, -libs (why twice?))

Then tested the gst-launch method and it now works correctly.

Also tested sound recorder (version 2.24). No change here - the playback still stutters. I don't want to try installing v 2.26 from source!

Comment 7 James Bridge 2009-05-13 14:18:05 UTC
Updated alsa-utils, libogg etc. Now back to situation described in comment #5.

Comment 8 James Bridge 2009-05-18 11:35:40 UTC
Following latest update to alsa-utils, i tried sound-recorder again - this time it worked, once at least. However, CPU usage is over 95%. It used not to be so high (see initial bug report).

Audacity is working correctly with the pulse settings; CPU usage about 80% for recording.

Comment 9 Bug Zapper 2009-11-18 10:54:03 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Bug Zapper 2009-12-18 07:43:36 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.