Even though this is only a P2, I felt it would be
quite bothersome for the users and might cause some
confusion.
The problem was the the wxLocale was being deleted
before all usage of it was complete. The fix was
to explicitly delete the plugin and module managers.
This puts the single instance checker back to pre-13868
behavior, so we're back to being able to open multiple
instance if the temp directory is different in portable
settings.
The access violation has apparently been happening for
quite a while, just hidden because it happened when
additional Audacity instances were executed and the DDE
command was sent to the first instance. After sending
the command, the connection was disconnected, but the
object had already been deleted by the command execution
so a first-chance exception was triggered.
Command line parsing has been revised and used
for the primary Audacity command line as well as
any secondary Audacity executions.
This way if multiple filenames are included on
the secondary executions, then we now pass ALL
of the filenames instead of just the first one.
Seem there's either a critter in the wx2812 socket IPC code (the
socket processing was rewritten for the wx3 series) that could
cause Audacity to hang during startup if more than 1 file was
opened at the same time. It was hit or miss, but more hit than
miss and was likely to occur when opening multiple files in a
file manager.
This fix was to stop using the wx2 IPC code and craft our own
basic startup messaging.
The problem was that different temp directories can
be specified when using Portable Settings. This caused
the single instance checker to look for it's lock file
in different locations so it was unable to detect that
another instance was running.
This changes the directory for the lock file to be the
user's home directory (which is the default for the checker
anyway). This allow the user to still specify different
temp directories in the Portable Settings and ensure's
that only one instance (per user) ever runs.
It now checks the single instance before initializing
preferences since preferences are modified during initialization
which could interere with an already running instance.
In addition, the Mac now uses the DDE IPC startup to
ensure all files are opened by the single Audacity instance.
Normally this is not needed since we also support the OSX
mechanism for opening by an existing process. But, that
only works if the exact same Audacity.app is used. There
are instances when this is not always the case.
I also ran across a problem with language initialization.
Since preferences were initialized before the locale was set,
dialogs would be shown in English. I've made a change that sets
the language to the system language until the preferences are
loaded and then resets it to the user selected language.
The problem was that if the user chose to quit Audacity when
the auto recovery dialog was displayed, Audacity would crash
because the command line was still parsed and any filenames
listed on the command line would still be opened. But, that
would failed because "quit" processing had already been done.
Anyway, a simple one line fix.
With realtime preview, the keyboard user will need this to get
back and forth between the effect and the project window. Actualy,
the "problem" existed before this since the keyboard user couldn't
switch between project and Plot Spectrum windows.
The normal flags-based keyboard handling would not work since it
depends on the state of the project and requires a project window
to have the current focus.
In this new case, a modeless dialog may actually have the focus and
using the "switch window" key combo may happen in nearly any mode, like
while playing.
So, I "created" the concept of "meta" commands...ones that do not have
the restrictions mentioned above. The should be used sparingly and
you must be careful about what happens within their handlers.
I've added some of the new plugin stuff to LV2, Nyquist, and
Vamp so that they play better in the new system. They no
longer get bunched in with the Audacity effects when sorting
or grouping the menus. They have not been fully converted
but they should be good for 2.1.0.
Nyquist plugins now include ";author" and ";copyright"
statements.
Added the 4 new Nyquist plugins to the Windows build.
Audiounits are still coming...had to push them to the back
burner to get this other stuff out of the way.
Scanning for new plugins has been improved so that newly
discovered ones will be shown to the user when Audacity starts.
Effects menu sorting has been fixed and improved.
Disabling effect types in Preferences works again and you
no longer have to restart Audacity for them the change to work.
Effect usage in chains works again.
Plugin registration dialog code simplified a bit.
Group names in the pluginregistry are now base64 encoded. I
never really thought about it, but wxFileConfig group names
are case insensitive and since I was using the group name as
the plugin ID, I ran into a conflict on Linux where there
were two plugins with the same name, just different case. (And
they were different plugins.) Hoping all of this will change
when/if the config file gets converted to XML. (wx3 if finally
including XML support)
A fair amount of cleanup of this new code has been done and
will continue as more stuff is converted.
The big thing is the common efffects UI. Right now Ladspa and VST
have been converted to use it and Audiounits will be next. It makes
everything nice and consistent while reducing the clutter in the
dialog.
Other goodies are:
Ladspa effects now show output controls when supplied by the effect
Ladspa effects now work fine as Analyze type effects
Ladspa now has user presets
VST effects dialog is now less cluttered...leaving more room for the effect
Ladspa and VST effects now share a common UI
Ladspa and VST effects are now usable in chains
Ladspa and VST effects now handle user presets the same way
Currently active effects settings automatically saved and reloaded
Can now do numeric range checking on input fields.
And, as always, plenty of critter squashing.
The casting macros wxStaticCast and wxDynamicCast from wxWidgets only work within the hierarchy registered to the wxWidgets class runtime information. But neither the base class wxLog nor the derived class AudacityLogger involved in the cast qualify for this.
This error wasn't visible with wxWidgets 2.8 because asserts weren't activated there by default, which prevented the code that causes the invalid memory access from being executed.
Note: After original creation of this fix, the line causing the crash has been changed in r13426 from using wxStaticCast to wxDynamicCast, which avoids the crash for now thanks to a lucky coincidence. It's still not the desired behaviour (before this fix the runtime type check only checked for wxEvtHandler instead of AudacityLogger) and could start to crash again, depending on implementation details of wxDynamicCast. Hence this fix was still needed, and it was adjusted accordingly.
In r13510 I had neglected to build with all local libraries and some of
them needed attention.
So, I also took the opportunity to work out the locale directory and
how to keep it unmolested as well. As a result, all locales are rebuilt
as expected, but into the "build" directory.
As a bonus you may now test Audacity from the "build" directory and have
Nyquist plugins and message catalogs available (so you can test other
languages again without havint to install).
So, again:
mkdir buildme
cd buildme
../configure
make
./audacity
I've made it where you can enable and disable via experimentals:
EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK
You will notice that, as of now, the only effects currently set up for
realtime are VSTs. Now that this is in, I will start converting the
rest.
As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects. This isolates the effects from changes in Audacity and makes
it much easier to add new ones.
Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too. There are quite a few VSTs for Linux if
you search for them.
The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me. I'm not really sure it should
stay in as-is. I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects. It should probably
revert back to that idea.
You may notice that this DOES include the API work I did. The realtime effects
were too tied to it and I didn't want to redo the whole thing. As I mentioned
elsewhere, the API stuff may or may not be very future proof.
So, let the critter complaints commence. I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly. ;-))
A complication is that the 'OnEventLoopEnter()' gets called many times, so we need to only call FinishInits() once. There is something else not right with the dialog this early on, so for now I have moved it back into the OnAppInit() which works on both wx2.8.12 and 3.0.1.
This is after reading a note in the release notes for wxWidgets 3.0.0. We need an event loop running to show a dialog in 3.0.0 (even though the splash screen works without).
Previously MultiDialog attempted to centre on parent dialog, but there was a NULL parent. Now the application top window is used. Dialog shows centred, for example when there are missing block files. If the top window is a WX_STAY_ON_TOP, we move our dialog to the left, as otherwise it would be partially hidden.
Previously Audacity would ask about enabling a module whilst the splash screen was showing. For some as yet undetermined reason the MultiDialog and Splash Screen are incompatible. Possibly it's related to doing a ShowModal before a full application exists. The not ideal workaround is to now delay showing the splash screen until after the modules have been loaded.
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX. You can get Windows to build, but there's
still some display issues.
These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
The problem was the the splash window was displayed
when the FFmpeg warning dialog appeared. Just needed
to hide it before deleting the window since the actual
deletion is defered to some time later.
To test on Windows:
1) Install gstreamer 1.0 devel and runtime
2) Add an GSTREAMER_SDK environment variable which points to the
gstreamer base directory
3) Uncomment USE_GSTREAMER in configwin.h
Relocates the translation tables to the bundle
This will change the location of the translation tables from:
<root>
Audacity.app/
Languanges/<langcode>/
to:
<root>
Audacity.app/Contents/Resources/<langcode>.lproj/
This will allow the menu items to be translated as expected.
This is an older one...originally from 2011. Bug says it all, but basically it allows logging
to begin immediately upon startup for all platforms. And it has multithreading protection, so
it should now be safe to log from the non-GUI threads.