The value in audacity.cfg is now prepended to the PATH
variable instead of appending it, so that directory
should be searched first.
It doesn't do fallback searches if the first attempt
fails.
But, it made another issue visible...several exporters
fail silently and the user may thing the export was
successful when it was not.
Will be hitting that next.
When the avutil_version and avcodec_version symbols are not found, fall back to
guess the filenames of avutil and avcodec (as done in r13195 and previously).
The non-monolithic libavformat is linked against libavcodec and libavutil.
Instead of (falsely) guessing the filenames of libavcodec and libavutil, get the
files that the libavformat library is linked against. This fixes wrong filename
guesses and avoids run-time issues by using incompatible libavcodec/libavutil
version with libavformat.
av_frame_alloc/av_frame_free are defined in avutil, but the deprecated
alternative functions avcodec_alloc_frame/avcodec_free_frame are defined in
avcodec instead. FFMPEG_INITALT needs to be enhanced to support different
library names.
Log level info is the default in FFmpeg and its quite hidden anyway so users
should not see it anyway unless they look/search for it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Benjamin Drung <bdrung@debian.org>
This still depends on internal API
And is missing planar Audio support, so not all formats work
also the fixed size audio buffer has to be removed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Benjamin Drung <bdrung@debian.org>
to /Library/Application Support/audacity/libs to circumvent
Apple's propensity for thinking your system belongs to them.
I have sent the new installers to Gale and expect they will
go to Buanzo's site fairly soon.
This should fix the detection problems on the Mac and may even help with issues
on Windows and Linux.
On any of the platforms, the main issue is the search path for libraries and
how absolute path names are handled. The Mac seems to be especially
susceptible since there isn't one concrete location where libraries are stored.
Windows handles absolute paths differently and allows runtime updates to the
environment variables (and if push comes to shove, provides the
SetDllDirectory() function), so if problems still exist, they should be easy to
circumvent.
This patch does three things:
1) It adds a shell script on OSX that takes care of starting Audacity after
reassigning and clearing the DYLD_LIBRARY_PATH environment variable. This will
allow loading of libraries from their absolute path rather than searching
DYLD_LIBRARY_PATH first. This script should be transparent to the user, but it
will affect people running Audacity with gdb as they will have to specifically
target Audacity.app/Contents/MacOS/Audacity instead of the Audacity.app bundle.
Not big deal really. If ppl no enough to use gdb from the command line, they
should be able to figure it out.
2) It corrects detection of a monolithic FFmpeg library. This is one where
avformat, avcodec, and avutil have all been linked into one large library. The
main issue here was that under OSX and Linux, looking for symbols that should
reside in avutil and avcodec, would always succeed since dlsym() on these
platforms not only scans the requested library, but any dependent libraries as
well. And when avformat was loaded, it would pull in it's dependent libraries
as well.
Another issue here was the if it was determined that the library was not
monolithic, the library was never unloaded, so those dependent libraries may
have come from the wrong location since they would have been loaded via the
normal search paths and not by absolute path name.
3) It adds a method to FileNames which returns the full path name of a loaded
module that contains an address. In the case of FFmpeg, it is used to verify
that a routine from a specific library is actually being used from that library
or not. It is also used to show (in Help->Show log) the directory from which a
library was actually loaded.
Returned some of them to wxLogMessage from wxLogDebug.
Made paths displayed consistently with '%s'. Changed some wordings for grammar and clarity.
Var renames for clarity. Moved some declarations closer to their usage.
Commented out the places where sys error logging was suppressed. There was no explanation why they were suppressed.