Thread: [Audacity-devel] Audacity freezes when using playthrough.
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: <mi...@ca...> - 2007-08-11 04:00:50
|
Hi folks=A0! I hope I've reached the right place and that I'm not asking a recurring question or so=A0:-) I've just installed Audacity 1.3.3-beta on a recent Gentoo (ALSA only, don't use OSS emulation), together with portaudio-19_pre070707 and alsa-lib-1.0.14a-r1. I'm experiencing freezes when using any of the playthrough options. The first time I record is obviously ok (there's no playthrough to make), but the second time, just a huge freeze. The backtrace shows something like that=A0: #0 0xb763ddd0 in snd_interval_refine_set () from /usr/local/lib/libasound.= so.2 #1 0xb764a1df in _snd_pcm_hw_param_set () from /usr/local/lib/libasound.so= .2 #2 0xb764a349 in snd_pcm_hw_param_set () from /usr/local/lib/libasound.so.2 #3 0xb7645754 in snd_pcm_hw_params_test_period_size () from /usr/local/lib= /libasound.so.2 #4 0x082f79d2 in wxFileDialogBase::GetMessage () [...] or #0 0xb74c397c in memcpy () from /lib/libc.so.6 #1 0xb76f425d in snd_pcm_hw_param_set () from /usr/local/lib/libasound.so.2 #2 0xb76ef514 in snd_pcm_hw_params_test_period_size () from /usr/local/lib= /libasound.so.2 #3 0x082f79d2 in wxFileDialogBase::GetMessage () I know this bug report sounds like an empty shell, but do you have any clue of what I can do to investigate deeper in this problem=A0? Sure it looks like a libasound bug, but who knows=A0?=A0:-) Thanks in advance. =2D-=20 | Micha=EBl `Micha' Cadilhac | Le copillage-collage = | | http://michael.cadilhac.name | tue le programmeur. = | | JID/MSN: | -- Dictons LRDE = | `---- mic...@gm... | - = --' |
From: <xip...@xi...> - 2007-08-11 08:54:10
|
Looks like a ALSA bug. As much as I complain about portaudio, you can't blame it for Linux's audio system being lower quality than it is. First overall recommendation for alsa: If you're doing anything fancy in your .asournd, stop. In my own personal experience, libasound (outside of basic playback) is buggy as all hell and is more likely to shock you in the nads than do what the documentation claims it will. If you're not doing anything fancy in your .asoundrc, drop back to an older version of libasound or an older alsa driver, otherwise "helllooooo gdb." Wish I could help more. Monty |
From: Richard A. <ri...@au...> - 2007-08-11 09:34:31
|
On Sat, 2007-08-11 at 05:48 +0200, Michaël Cadilhac wrote: > I hope I've reached the right place and that I'm not asking a recurring > question or so :-) > > I've just installed Audacity 1.3.3-beta on a recent Gentoo (ALSA only, > don't use OSS emulation), together with portaudio-19_pre070707 and > alsa-lib-1.0.14a-r1. Audacity's build system doesn't use a system copy of portaudio, it uses the one in the audacity source tarball (unless you are hacking the build system, in which case, don't). > I'm experiencing freezes when using any of the playthrough options. The > first time I record is obviously ok (there's no playthrough to make), > but the second time, just a huge freeze. So you have a problem with "Play other tracks whilst recording", not "software playthrough" ? > The backtrace shows something like that : > > #0 0xb763ddd0 in snd_interval_refine_set () from /usr/local/lib/libasound.so.2 > #1 0xb764a1df in _snd_pcm_hw_param_set () from /usr/local/lib/libasound.so.2 > #2 0xb764a349 in snd_pcm_hw_param_set () from /usr/local/lib/libasound.so.2 > #3 0xb7645754 in snd_pcm_hw_params_test_period_size () from /usr/local/lib/libasound.so.2 > #4 0x082f79d2 in wxFileDialogBase::GetMessage () > [...] > > or > > #0 0xb74c397c in memcpy () from /lib/libc.so.6 > #1 0xb76f425d in snd_pcm_hw_param_set () from /usr/local/lib/libasound.so.2 > #2 0xb76ef514 in snd_pcm_hw_params_test_period_size () from /usr/local/lib/libasound.so.2 > #3 0x082f79d2 in wxFileDialogBase::GetMessage () > > I know this bug report sounds like an empty shell, but do you have any > clue of what I can do to investigate deeper in this problem ? Recompile audacity with debug symbols, so we get line numbers in the source not 0xb76f425d. Assuming you are installing through portage, then set "nostrip" in your features, then re-emerge. You will also have to do the same for any libraries that we need to trace through, so by the looks of things, libasound would be a good idea. I'm running alsa-lib-1.0.14_rc2 and audacity-1.3.3 from portage on gentoo x86, and both playthrough options work fine for me. What platform are you on? Richard Ash |
From: <mi...@ca...> - 2007-08-11 12:17:31
|
Richard Ash <ri...@au...> writes: Hi Richard=A0! > Audacity's build system doesn't use a system copy of portaudio, it uses > the one in the audacity source tarball (unless you are hacking the build > system, in which case, don't). I don't, this is ok=A0:-) > So you have a problem with "Play other tracks whilst recording", not > "software playthrough" ? Sorry, I wrote part of my previous email before checking with ``software playthrough''. But both playthrough cause freezes. > Recompile audacity with debug symbols Was afraid that you'd say that=A0:-) Well, the process is launched. I'll give you a full backtrace when it's finished. > I'm running alsa-lib-1.0.14_rc2 and audacity-1.3.3 from portage on > gentoo x86, and both playthrough options work fine for me. What platform > are you on? A plain 'ol x86 mono-processor (Pentium M) with no fancy stuff. Thank you for the answer, I'll get back to you as soon as I can. =2D-=20 | Micha=EBl `Micha' Cadilhac | Mieux vaut se taire = | | http://michael.cadilhac.name | Que de parler trop fort. = | | JID/MSN: | -- As de tr=E8fle = | `---- mic...@gm... | - = --' |
From: <mi...@ca...> - 2007-08-11 13:32:32
|
mi...@ca... (Michaël Cadilhac) writes: > Thank you for the answer, I'll get back to you as soon as I can. Here we go. Here's the full backtrace : |
From: Richard A. <ri...@au...> - 2007-08-11 14:22:29
|
On Sat, 2007-08-11 at 15:31 +0200, Michaël Cadilhac wrote: > mi...@ca... (Michaël Cadilhac) writes: > > > Thank you for the answer, I'll get back to you as soon as I can. > > Here we go. Here's the full backtrace : Thanks for the information. I'm unfortunately going away now until Wednesday, but I promise I will look at it properly then. > With the following patch, it works just fine > > I did it by intuition, but it seems that a previous loop uses the same > construct. This looks like it is in portaudio (rather than the core audacity code), so the best solution is to report it to the portaudio development team at http://portaudio.com/contacts.html And get them to incorportate it in their code. Don't forget to prod us to update our local copy to get the fix! If they don't get it dealt with fairly promptly, then we can consider patching the copy in the audacity source independently, but this can get messy quite quickly. It looks like a nice clean patch to fix a simple problem, so I can't see any issues with getting it into portaudio. Richard |
From: <mi...@ca...> - 2007-08-11 13:45:25
Attachments:
portaudio.patch
|
mi...@ca... (Michaël Cadilhac) writes: > The loop incriminated (it just `continue's forever) is > > while( optimalPeriodSize >= periodSize ) > { > if( snd_pcm_hw_params_test_period_size( self->capture.pcm, > hwParamsCapture, optimalPeriodSize, 0 ) < 0 ) > continue; > if( snd_pcm_hw_params_test_period_size( self->playback.pcm, > hwParamsPlayback, optimalPeriodSize, 0 ) >= 0 ) > break; > optimalPeriodSize /= 2; > } > > With the following patch, it works just fine Patch against portaudio daily snapshot, if needed : |
From: <mi...@ca...> - 2007-08-12 22:29:07
|
Richard Ash <ri...@au...> writes: > And get [portaudio] to incorportate [the fix] in their code. Don't > forget to prod us to update our local copy to get the fix! The fix has successfully reached the portaudio repository! Great landing, happy people cheering around.=A0:) =2D-=20 | Micha=EBl `Micha' Cadilhac | I am very sad for you = | | http://michael.cadilhac.name | that you are running = | | JID/MSN: | Windows Vista. = | `---- mic...@gm... | -- RMS - = --' |
From: Richard A. <ri...@au...> - 2007-08-15 21:42:58
|
On Mon, 2007-08-13 at 00:27 +0200, Michaël Cadilhac wrote: > Richard Ash <ri...@au...> writes: > > > And get [portaudio] to incorportate [the fix] in their code. Don't > > forget to prod us to update our local copy to get the fix! > > The fix has successfully reached the portaudio repository! Great > landing, happy people cheering around. :) OK, it's not broke now, but it's not updated either, pending finding out what has been done to the current copy. I've got a patch for the OS X build changes ready to go onto the new copy (as this hasn't gone upstream it seems), but there must be a bigger (older?) lump to do. Richard |
From: Richard A. <ri...@au...> - 2007-08-15 21:05:41
|
On Mon, 2007-08-13 at 00:27 +0200, Michaël Cadilhac wrote: > Richard Ash <ri...@au...> writes: > > > And get [portaudio] to incorportate [the fix] in their code. Don't > > forget to prod us to update our local copy to get the fix! > > The fix has successfully reached the portaudio repository! Great > landing, happy people cheering around. :) OK, I was going to commit a new snapshot of portaudio-v19 to audacity's CVS, except that it appears there are some other patches in our copy that aren't in upstream, because portmixer breaks when I do the update. Anyone understand how this is supposed to work? As a starting point, I've created a file in lib-src/audacity-patches.txt with a list of libraries, home pages, current versions and patches. Unfortunately I only found out that the new snapshot didn't work after I had committed the updated files into CVS. I can't find on the web how to do a proper roll-back to the previous snapshot (last touched at the start of last month), short of working out the revision numbers for before and after for each and every file, then moving them back one by one. I've still got the old tree on disk - should I just force it over the top of the failed update? I can do this with SVN, but can't find the equivalent mechanism in cvs. Appologies to everyone who will get a broken CVS checkout of libsrc at the moment as a result. Richard |
From: Leland <le...@au...> - 2007-08-16 18:14:16
|
Quoting Richard Ash <ri...@au...>: > > Anyone understand how this is supposed to work? > Look for the portaudio.patch file in the portmixer directory. Apply it to a fresh copy of portaudio. You might have to rework a thing or two to make it fit, but I don't think you should since there hasn't been that many changes to PA (that I recall anyway). After applying the patch, could ya recreate it and re-add the date at the top as a reminder? Leland |
From: Richard A. <ri...@au...> - 2007-08-16 21:22:25
|
On Thu, 2007-08-16 at 12:56 -0500, Leland wrote: > Quoting Richard Ash <ri...@au...>: > > > > Anyone understand how this is supposed to work? > > > Look for the portaudio.patch file in the portmixer directory. Apply it to a > fresh copy of portaudio. You might have to rework a thing or two to make it > fit, but I don't think you should since there hasn't been that many changes to > PA (that I recall anyway). OK, applies fine with a bit of fuzz. I've written the sequence of operations that work up in the patches file, which should save some grief in future. > After applying the patch, could ya recreate it and re-add the date at the top as > a reminder? Done. Is there an easy way to do this? I found myself deleting loads of bits out of the patch where CVS had updated dates / users or other minor things that we didn't want in the patch. Should I be making the diff immediately after applying the patch rather than from the committed files? Richard |
From: Leland <le...@au...> - 2007-08-17 01:46:52
|
Quoting Richard Ash <ri...@au...>: > Should I be making the diff > immediately after applying the patch rather than from the committed > files? > Yepper, that was what I did...because of the same reason...all those RCSID diffs. Leland |
From: <mi...@ca...> - 2007-08-11 12:25:04
|
xip...@xi... writes: > Looks like a ALSA bug. As much as I complain about portaudio, you > can't blame it for Linux's audio system being lower quality than it > is. ... !! Well, audio software on Linux seems to be a great lovely place to work in=A0:-) > First overall recommendation for alsa: If you're doing anything fancy > in your .asournd, stop. I don't. I wish I did, because now it's indeed ``helloooo gdb''. Thanks for the reply=A0! =2D-=20 | Micha=EBl `Micha' Cadilhac | One user is enough. = | | http://michael.cadilhac.name | People suck. = | | JID/MSN: | = | `---- mic...@gm... | -- Tuomo Valkonen - = --' |