On Mon, 2009-12-28 at 01:54 +0100, Michael Schwendt wrote:
> On Sun, 27 Dec 2009 19:45:23 +0100, I wrote:
> > As I understand it, Audacity should normally resample on-the-fly.
> > Is this known to be broken?
>
> Probably not ;) and here's the rationale:
>
> 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. 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.
What system package of libresample? As the wiki page implies (but didn't
make clear, I've fixed it), the libresample in Audacity CVS is
"internal" to Audacity, based of the Stanford code.
There seem to be a number of other forks of the Stanford code, the
Audacity code and probably other things out there - I have no idea what
your system package might be, except probably not the same as what
Audacity is using. Either way I (we) disclaim responsibility for any
copy of "libresample" outside the Audacity source tree, and don't test
with any of them. I don't think external libresample is supported by our
configure script - certainly I've never tested it ...
> 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.
Sounds like there may be a genuine bug here, which would of course
remain regardless of using internal / external libsamplerate. I think we
need to split this into two different bugs at this point.
> Is there a recommendation on whether to prefer libresample over libsamplerate
> or vice versa? The latter seems slower to me. And if official builds of
> Audacity use libresample, I would feel better if Fedora's package would do
> the same.
All the Audacity released binaries use libresample to avoid licensing
hassle (especially as there are closed-source VAMP plug-ins available
for Linux now). If the user doesn't specify a preference when running
configure it selects the internal libresample, so implicitly that's what
we recommend.
We are still fixing libsamplerate bugs when they are reported, not least
because it's probably a better resampling library (it's certainly a more
flexible one), but I'm sure not many people use it. Gentoo's ebuild
supports both, but defaults to libresample unless the user sets a flag
to use libsamplerate.
Richard
|