Bug 550730 - Audacity stops recording when unsupported sample rate selected
Summary: Audacity stops recording when unsupported sample rate selected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: audacity
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michael Schwendt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-27 03:54 UTC by Matt Hirsch
Modified: 2010-01-26 00:53 UTC (History)
3 users (show)

Fixed In Version: 1.3.10-0.4.beta.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-26 00:53:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Image of a tracking being recorded (9.98 KB, image/png)
2009-12-27 03:54 UTC, Matt Hirsch
no flags Details

Description Matt Hirsch 2009-12-27 03:54:44 UTC
Created attachment 380495 [details]
Image of a tracking being recorded

Description of problem:

When recording from my USB web cam mic, if I select a sample rate not supported by the source, audacity records a fraction of a second of audio, and then stops. The progress bar keeps moving, but no new data shows up.

My card only supports 16kHz. If I select 16kHz in audacity recording works fine, but if I select a different sample rate I get the behavior described above.

Version-Release number of selected component (if applicable):

audacity-1.3.9-0.5.beta.fc12.x86_64

alsa-utils-1.0.21-2.fc12.x86_64
alsa-lib-1.0.21-3.fc12.x86_64

How reproducible:

always

Steps to Reproduce:
1. Select USB Audio source as input
2. Select a sample rate not offered by the audio source
2. Press record button
  
Actual results:

Recording stops getting new data after a fraction of a second.

Expected results:

Normal recording (interpolation or decimation), or error message if not possible.

Additional info:

$ cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0x80020000 irq 17
 1 [Notebook       ]: USB-Audio - VF0470 Live! Cam Notebook
                      Creative Labs VF0470 Live! Cam Notebook at usb-0000:00:0b.0-1, full speed

$ cat /proc/asound/card1/stream0 
Creative Labs VF0470 Live! Cam Notebook at usb-0000:00:0b.0-1, full speed : USB Audio

Capture:
  Status: Stop
  Interface 2
    Altset 1
    Format: 0x2 (16 bits)
    Channels: 1
    Endpoint: 2 IN (ASYNC)
    Rates: 16000

Its very possible this is a problem with the alsa driver for the camera mic. jack-audio-connection-kit also has a similar problem.

Comment 1 Michael Schwendt 2009-12-27 10:11:04 UTC
Is this the same with Audacity 1.3.10-beta in the "updates-testing" repo?

Comment 2 Matt Hirsch 2009-12-27 18:09:21 UTC
Yes.

Comment 3 Michael Schwendt 2009-12-28 00:52:34 UTC
Okay, thanks. This is reproducible also with ordinary audio sources.

Audacity resamples on-the-fly if the project rate doesn't match the audio input rate. Fedora's build of Audacity uses libsamplerate 0.1.7 whereas Audacity by default would use libresample 0.1.3 (and also contains an optional copy of that library source code). (the background is explained here: http://wiki.audacityteam.org/index.php?title=Libresample )

Building with the included libresample, the problem is _not_ reproducible.

Building with the system's libresample, the build fails early. Perhaps just because of a broken pkg-config file (bug 550885). This will need a fix in that package or a temporary work-around in our audacity package in case we would like to switch to libresample. (Ubuntu builds with libresample, btw.)

When using libsamplerate, the recording stops early because Audacity's resampling code sets an "end of input" flag for all sample input buffers. If not doing that, the problem disappears here.

A test-build can be found here:
http://koji.fedoraproject.org/koji/buildinfo?buildID=148704

Comment 4 Michael Schwendt 2009-12-28 10:48:22 UTC
Hmm, need to correct myself. In 1.3.6-3 Ubuntu also switched to building --with-libsamplerate=system --without-libresample, so it's not just Fedora that does this.

Comment 5 Fedora Update System 2010-01-19 00:58:37 UTC
audacity-1.3.10-0.3.beta.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update audacity'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13139

Comment 6 Fedora Update System 2010-01-22 22:37:07 UTC
audacity-1.3.10-0.4.beta.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update audacity'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13139

Comment 7 Fedora Update System 2010-01-26 00:52:42 UTC
audacity-1.3.10-0.4.beta.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.