Re: [Audacity-devel] Fw: SoX resampling
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Gale A. <ga...@au...> - 2012-11-13 00:35:22
|
| From Vaughan Johnson <va...@au...> | Mon, 12 Nov 2012 15:28:55 -0800 | Subject: [Audacity-devel] Fw: SoX resampling > On 11/11/2012 3:56 PM, Gale Andrews wrote: > > > > | From Rob Sykes <aq...@ya...> > > | Sat, 10 Nov 2012 07:48:50 +0000 (GMT) > > | Subject: [Audacity-devel] Fw: SoX resampling > >> ----- Original Message ----- > >> > >>> From: Vaughan Johnson <va...@au...> > >> > >> > >>>>> However, the build then fails later with missing methods: > >>>>> > >>>>> QualityPrefs.cpp:(.text+0x84d): undefined reference to > >>> `ConstRateResample::GetNumMethods()' > >>>>> etc. > >>> > >>> Same problem. If you're not building libsoxr, USE_LIBSOXR needs to be > >>> #undef-ed. > >> > >> > >> Sorry folks, my mistake, after a clean build it was okay. So just this minor change is needed to support deselecting libsoxr: > >> > >> Index: m4/audacity_checklib_libsoxr.m4 > >> =================================================================== > >> --- m4/audacity_checklib_libsoxr.m4 (revision 12038) > >> +++ m4/audacity_checklib_libsoxr.m4 (working copy) > >> @@ -11,7 +11,7 @@ > >> LIBSOXR_ARGUMENT=$withval, > >> LIBSOXR_ARGUMENT="unspecified") > >> > >> - if true ; then > >> + if false ; then > >> AC_DEFINE(USE_LIBSOXR, 1, > >> [Define if libsoxr support should be enabled]) > >> fi > >> Index: configure > >> =================================================================== > >> --- configure (revision 12038) > >> +++ configure (working copy) > >> @@ -5978,7 +5978,7 @@ > >> fi > >> > >> > >> - if true ; then > >> + if false ; then > >> > >> $as_echo "#define USE_LIBSOXR 1" >>confdefs.h > > > > Just to confirm, with that change (committed in r12040) I could > > do sudo make clean, svn up, ./configure then build on Ubuntu 12.04 > > 32-bit with libsoxr and libresample disabled, but libsamplerate > > enabled, without running ./autogen.sh before ./configure. > > > > About Audacity's "Build Information" looks correct, in that > > libsamplerate is "enabled", and libsoxr is "disabled". > > > > However Quality Preferences says "Resampling disabled" for > > both "High-quality" and "Real-time". > > As I said. OK, please bear with me. You said: "USE_LIBSOXR should always be on (for best const-rate resampling), definitely for our releases. If it's off, I'll have the code simply use the var-rate resampler. If they're all off -- error!" By which you mean, just a build error? > > So, if I play or export a tone where the track and project rate > > don't match, the result is just rapid "ticks". > > Right, it's not doing any resampling, it's just copying data from in to > out, but different size buffers. Well, in my ignorance I thought that case required "some" resampling library. Either way, if libsoxr is disabled that case gives very bad playback output for me (on the slow netbook). No problem if libsoxr is enabled (I tried the Ubuntu PPA build to test that). > > If I choose "dmix" as playback device, which only supports > > 48000 Hz on my machine, playback is garbage with anything > > other than a 48000 Hz file. > > > > Sorry if I am missing something, but I thought we were > > allowing libsamplerate only to be used (as in the past)? > > That's not what I understood. It was libsoxr for const-rate and > libresample/libsamplerate for var-rate. If you disable libsoxr, there is > no const-rate resampler. Again, I'm a little hazy here about the technicalities, but currently, only Time Tracks uses var-rate resampling? So, an example of const-rate resampling is this? * track at 44100 Hz * project rate at 48000 Hz * Tracks > Resample which by default will resample to 48000 Hz (and hangs with no error message in my build with only libsamplerate enabled). > And as I wrote, I can add code to have whichever var-rate is enabled to > do the const-rate, if no const-rate resampler is enabled. Indeed I do recall, but I thought that was about a choice in Preferences, where the behaviour if we did not have that choice would be for the enabled var-rate resampler to do const-rate in the absence of libsoxr. > Do you think there will be any demand for this? I thought in a previous > message, you said not. I thought there would be no demand for a preference. But if someone builds with only libsamplerate enabled (or I assume with only libresample enabled), isn't the behaviour too broken? Plus (as now) there are confusing messages that the var-rate resampler is enabled in Build Information, yet resampling is disabled in Preferences, yet resampling is done (by the var-rate resampler) for Time Track? Yes I know adding a preference would solve that, but is it worth the complication and possible confusion for most users? So the choice seems to me between: * letting the var-rate resampler do const-rate, without a choice, if libsoxr is not enabled * require libsoxr. Gale > > Or did I still need ./autogen.sh or made some other mistake? > > > > > > > > > > Gale |