Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209494 - media-sound/audacity-1.3.4-r1 fails at alsa recording/playback due to broken internal portaudio snapshot
Summary: media-sound/audacity-1.3.4-r1 fails at alsa recording/playback due to broken ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Professional Audio Applications Maintainers
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks: 210415
  Show dependency tree
 
Reported: 2008-02-10 06:15 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2008-03-02 16:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild with newer portaudio snapshot (audacity-1.3.4-r1.ebuild,2.70 KB, text/plain)
2008-02-10 06:18 UTC, Alexandre Rostovtsev (RETIRED)
Details
portaudio-cvs-rev1.7.patch (for above ebuild) (portaudio-cvs-rev1.7.patch,40.57 KB, patch)
2008-02-10 06:21 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2008-02-10 06:15:58 UTC
audacity-1.3.4 (and audacity-1.3.4-r1) includes a buggy portaudio-v19 snapshot for audio recording/playback. As a result, starting audacity or opening the preferences dialog takes a minute due to timeouts, all attempts at playback or recording to alsa devices fail, and the application prints a constant stream of error messages:

configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1034
Expression 'AlsaOpen( hostApi, parameters, streamDir, &pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1066
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1034
Expression 'AlsaOpen( hostApi, parameters, streamDir, &pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1066
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1034
Expression 'AlsaOpen( hostApi, parameters, streamDir, &pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1066
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1034
Expression 'AlsaOpen( hostApi, parameters, streamDir, &pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1066

etc. See the Debian bug (in the URL field) for more gory details.

The solution is to update audacity's internal portaudio snapshot to 2007-12-07 or later, which is known to fix the alsa and jack bugs. This has already be done by audacity upstream:

http://audacityteam.org/wiki/index.php?title=Audacity_PortAudio_v19
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2008-02-10 06:18:38 UTC
Created attachment 143093 [details]
Ebuild with newer portaudio snapshot

To fix the bug, here's an ebuild that uses the 20071207 portaudio-v19 snapshot.
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2008-02-10 06:21:53 UTC
Created attachment 143095 [details, diff]
portaudio-cvs-rev1.7.patch (for above ebuild)

Patch from audacity CVS, modifications to portaudio-v19 required for audacity to compile. Used by the above ebuild.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-02-24 08:54:20 UTC
Erm... This should use system portaudio libs, not any bundled nonsense. Until portaudio-19 gets unmasked, the functionality should be just hard disabled.
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2008-02-24 15:50:59 UTC
(In reply to comment #3)
> Erm... This should use system portaudio libs, not any bundled nonsense. Until
> portaudio-19 gets unmasked, the functionality should be just hard disabled.

1. Audacity-1.3 has ZERO functionality without portaudio (because it uses portaudio for all sound I/O).
2. Audacity-1.3 cannot use external portaudio-18, because -18 and -19 have different APIs and feature sets.
3. (this is the fun part) Audacity-1.3 CANNOT use an external portaudio-19 either! This is because it actually uses a custom-patched CVS snapshot of portaudio-19, and those patches have apparently not been taken by portaudio upstream.

So in this case, I recommend doing what Audacity upstream recommends, and using their bundled patched internal portaudio snapshot.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-02-24 15:59:55 UTC
(In reply to comment #4)
> Audacity-1.3 CANNOT use an external portaudio-19
> either! This is because it actually uses a custom-patched CVS snapshot of
> portaudio-19, and those patches have apparently not been taken by portaudio
> upstream.

Yeah, this is just wonderful strategy. Shipping (broken as a bonus) custom-patched bundled libs is definitely the way to go... should be employed more widely for complete PITA maintainer experience. In a similar way, this also bundles its own allegro and links it in statically so that in case of vulnerability users can enjoy that permanently.
Comment 6 Alexis Ballier gentoo-dev 2008-02-29 22:03:45 UTC
(In reply to comment #2)
> Created an attachment (id=143095) [edit]
> portaudio-cvs-rev1.7.patch (for above ebuild)
> 
> Patch from audacity CVS, modifications to portaudio-v19 required for audacity
> to compile. Used by the above ebuild.
> 

hmm the patch doesn't apply here against 1.3.4 :(
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2008-02-29 22:34:46 UTC
(In reply to comment #6)
> hmm the patch doesn't apply here against 1.3.4 :(

Of course not. Look at what the attached ebuild does. The patch is not applied to audacity-1.3.4; instead it is applied to the portaudio v19_20071207 snapshot (which the ebuild uses to replace audacity-1.3.4's broken portaudio snapshot)
Comment 8 Alexis Ballier gentoo-dev 2008-02-29 22:52:32 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > hmm the patch doesn't apply here against 1.3.4 :(
> 
> Of course not. Look at what the attached ebuild does. The patch is not applied
> to audacity-1.3.4; instead it is applied to the portaudio v19_20071207 snapshot
> (which the ebuild uses to replace audacity-1.3.4's broken portaudio snapshot)
> 

ha ! I didnt see that, thanks ! Indeed, it seems to improve alsa playback (which happened to not work at all recently here while it used to work if using a specific frequency rate iirc).

Any reason to use pa_stable from dec. 2007 while audacity cvs uses one from jan. 2008 ?
Comment 9 Alexandre Rostovtsev (RETIRED) gentoo-dev 2008-02-29 23:16:02 UTC
(In reply to comment #8)
> Any reason to use pa_stable from dec. 2007 while audacity cvs uses one from
> jan. 2008 ?

No reason, it's just that while googling for how to fix the bug, I've read many reports that Dec. 2007 portaudio snapshots are known to work well, and I know that audacity used to have the 20071207 snapshot in their CVS version (although I guess they have upgraded to a newer snapshot by now).
Comment 10 Alexis Ballier gentoo-dev 2008-03-01 16:58:51 UTC
updated in r2, thanks a lot !
Comment 11 glen martin 2008-03-02 16:31:10 UTC
If audacity 1.3.4-r1 is known to not work because of this issue, should it be (hard)masked?  It still shows as stable.