Commit Graph

40 Commits

Author SHA1 Message Date
Paul Licameli 84c0337aba Fix TAB key navigation on Mac for all dialogs (not only for panels) 2016-07-10 17:12:27 -04:00
Paul Licameli 4739f3e27b Compensate for wxW 3 tab navigation deficiencies on Mac...
... using char hook event handlers.  We don't need to go the extreme length
of patching wxWidgets source.
2016-06-25 19:14:05 -04:00
Paul Licameli e0476b5e71 Module interfaces managed by smart pointers 2016-04-06 16:06:30 -04:00
Paul Licameli a9afad17ca Plugin instances managed without naked new and delete 2016-04-06 16:06:27 -04:00
Paul Licameli 7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli 1c07741d57 Sizers are owned by wxWindow objects when added, so use safenew, or...
... use unique_ptr in the interim between building them and adding.

This checks eliminates some naked news, which were not paired with deletes.
2016-02-18 18:58:38 -05:00
Paul Licameli 3f237daddc Use macro safenew for many allocations of wxWindow subclasses 2016-02-14 20:20:19 -05:00
Leland Lucius d1f66d768f Updates for wx3
A long way to go yet, but many OSX issues fixed including
conversion of Audio Unit effects.
2015-06-30 11:25:32 -05:00
Leland Lucius 7d359ef010 Fix bug #923 and allow for varying decimal sepatators in settings 2015-06-02 15:06:52 -05:00
Leland Lucius 2c7c0eb0b6 Fix for bug 873 and 874 2015-05-26 09:32:31 -05:00
Leland Lucius 2028628e82 Only set input parms when inputs are available...ditto output 2015-05-26 00:22:35 -05:00
Leland Lucius 52448d98d1 Determine if AU is interactive or not 2015-05-22 12:28:44 -05:00
Leland Lucius 7a0aa43a82 Convert all wxTRANSLATE() to XO()
XO() can be used anywhere a string must be extracted for translation
but not automatically translated at runtime.
2015-04-18 23:03:49 -05:00
Leland Lucius 8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00
lllucius 10f62cdae5 Fix for bug #833
This allows duplicate items in the effects menus and provides a
means to uniquely identify each item.
2015-01-19 16:28:48 +00:00
lllucius@gmail.com 85f6279d21 This fixes a couple of issues with AudioUnits and 1 with latency
If latency was introduced by an effect, the input position could
get offset by the amount of latency, such that the same input
would be processed twice for the number of sample of latency.

There was an issue in AUs where a "latency done" flags wasn't
being reset and so the second and subsequent uses of an effect
could not latency correct.

And in research that, I found that you need to set the sample rate
on all 3 scopes (global, input, and output) instead of just the
global scope.
2015-01-11 22:52:08 +00:00
lllucius cd315f7f1e Do NOT call SetHost() after changing options
This reinits stuff that shouldn't be reinited while actively
previewing.  So, just reload the settings directly.
2015-01-05 09:00:10 +00:00
lllucius@gmail.com aa49817563 Fixes 2 VST issues, an RTP issue, and relaxes an AU restriction
1)  Shell VSTs were completely unrecognized...that is no longer the case
2)  All VSTs will now ALWAYS be initialized and cleaned up from the main
    GUI thread.  I found that some Waves VSTs would freeze Audacity when
    initialized in the audio thread and closed in the GUI thread.
3)  While realtime previewing, it was possible that the wrong slave 
    could be used to process new blocks of audio.
4)  I found that the Waves AUs don't crash on a real Mac (instead of a
    virtual machine), so I removed the "black list" I'd put in just for
    them.  (Something to do with needing full 3D support I think.)

Anyway, #2 and #3 were quite intrusive, so as much RTP testing as possible
would be a good thing.
2015-01-02 05:24:43 +00:00
lllucius 7b6cbeec22 Distinct button bars for graphical and textual modes
This bit the textual mode plain old text based buttons
and retains the bitmap buttons for graphical mode.

It also allowed me to remove the manual accelerator table 
building (no access keys in GUI mode) which was a good 
thing as I really didn't know if the was gonna work for
non-English keyboards anyway.
2014-12-16 21:41:58 +00:00
lllucius@gmail.com fbae2c5b28 Better initial size for AUs that are smaller than minimum dialog size. 2014-12-16 05:40:04 +00:00
lllucius 16ca4f17eb Re-adding localized menu labels for effects
If you can believe it, this whole big mess is
just to get localized effect labels back into
the menus.

I sure wish I'd had a little bit more time to
finish up all of the effects.  It sure would 
be a lot cleaner (code wise).
2014-12-15 21:54:23 +00:00
lllucius 3e28f0889b Change "setting" to "option" in dialog text 2014-12-15 15:51:42 +00:00
lllucius@gmail.com a98a0ef654 More pointer madness fixes
This round fixes Mac pointers when mouse transitions from
the main project window to an open effect window in GUI
mode and back.

Not all of the cases are fixed with VST overlay windows
being the final holdout.  Couldn't figure out the cause
so will just deal with it when we convert to wx3.

(I GET TO REDO ALL OF THIS FOR WX3...WOOHOO!!!)
2014-12-15 07:59:53 +00:00
lllucius@gmail.com 3da4e22cee Rename Settings to Options in RTP dialogs
This was suggested here:

http://audacity.238276.n2.nabble.com/Effect-options-dialogs-should-be-titled-Options-not-Settings-tt7566034.html

(Probably should delete your pluginregister.cfg file, but not a requirement.)
2014-12-15 04:49:06 +00:00
lllucius@gmail.com f677bc00df Reinstate close handle for AudioUnits
Closing the window via the frame's close button was
not being recognized by wxWidgets.  I'm sure it's
because of the of the additional event handler, but
the close event should have been sent on to the wx
handler since it wasn't handled.

No matter...just capture the event and close the
window manually.
2014-12-09 15:58:42 +00:00
lllucius@gmail.com 01ca7c71de Sort of fix for bugs #665 and #460
This is more of a toleration than a fix since I can't
get any of the Waves plugins to display their custom views.
They do work in generic view however, so I've put in a 
temporary hack to force all Waves plugins to use the 
generic view.
2014-12-07 02:24:50 +00:00
lllucius@gmail.com 581b836c18 Fix a bogus delete in AudioUnits 2014-12-07 01:43:03 +00:00
lllucius@gmail.com cddff18025 Resolves reported bugs and (most) recommendations
All:

Export/Import now disabled if the Effect (family) doesn't support it
Options disabled if the Effect (family) doesn't support it
Standarized on "Latency compensation" instead of "Buffer delay compensation"
Correct loading/saving of factory default settings
Fixed "Mannage" to be "Manage"
Removed conditional code since we're keeping the transport buttons
Play bases state on actual playback status
Play no longer monkeys with selection
Play will now start from where it left off IF:
   The user stops the playback via the Effect Stop button
   If the user wants to restart from the beginning of the selection
   then the user can click Rewind while stopped.
Rewind will not go past start of selection (sorry Steve ;-))
   If Rewind is clicked while not playing, playback will next
   start at beginning of selection.
Fast Forward will stop at end of selection
   However, if FFwd is clicked while not playing, it will
   put playback at the end of selection and the next time
   the user clicks the Effect play button, playback will
   continue from the end of selection to the end of track.
Deleting a preset now prompts user to confirm
Button faces should now look a little better
Bypass (should we rename that???) button now grays when disabled

Audio Units:

Corrected all user visible "AudioUnit" strings to be "Audio Unit"
Removed unneeded "Buffer Size" in settings dialog
Only uses latency if user said it was okay

Ladspa:

Added settings dialog to allow control of latency usage
Removed unused "user selectable" buffer size
Only use latency if user wants it
Refresh controls when presets are loaded

VST:

Removed unused "Rescan at startup" setting
Propogate parameter loads to slave effects
2014-12-04 06:10:27 +00:00
lllucius@gmail.com 2acdcc3378 Beat effects windows on the Mac into submission
This should resolve all concerns with the effects windows like:

1)  Dropping behind the project window
2)  Obscuring other dialogs
3)  Keyboard cycling among the active windows
4)  Clicking twice to do something in another window
    NOTE:  VST effects with a Cocoa overlay still require it.
           Examples are Blue Cat and GRM.

This does tie an open effect to its parent project, but that should
be okay.  We'll need to verify that again once we start to allow
multiple open effects dialogs at once.
2014-12-01 07:27:49 +00:00
lllucius@gmail.com 125e0f37dd Add missing Export and Import of AudioUnit presets
And listens for latency changes now
2014-11-29 13:14:35 +00:00
lllucius@gmail.com d60225cb61 A few more changes for AudioUnits
I added a few assertions just to be safe.  Haven't hit
the particular situations yet, but I've only tested less
than 50 or so AUs.

We were missing a few Apple AUs like panners and mixers.

The plugin "installation" dialog sort is reversed on the Mac...weird

Made the effect windows float on top of the owning project window.
Looking for opinions on which method is best.
2014-11-29 01:22:41 +00:00
lllucius@gmail.com 540f5c78c9 AudioUnits rework...
They now work on Yosemite.

AudioUnits with a custom Cocoa UI now display graphically
instead of reverting to the generic view

The Cocoa version of the generic view is now used when
needed...instead of the Carbon version.

The order of UI preference is Cocoa, Carbon, Generic,
unless force to Generic view user setting.

They now support realtime preview.

They also support dialog resizing as I found many that
scaled nicely (mostly Apple's).

Uses the new Effect format so now supports user and
factory presets.

NOTE:  Be VERY critical when testing this as I've
       never written Objective-C or Cocoa code
       before!
2014-11-25 08:08:15 +00:00
lllucius 1eeb4d979a The fabled realtime effects...
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.  ;-))
2014-10-26 03:24:10 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
RichardAsh1981@gmail.com 488d5cd3cf Delete allocated buffers before returning error if subsequent allocation fails. Patch (to feedback@) by Martin Ettl. 2014-01-18 12:28:45 +00:00
lllucius@gmail.com 0a152d8f46 Once the effect is loaded, keep it loaded until Audacity ends. 2013-10-25 21:25:48 +00:00
lllucius 508ed858aa Fix for bug #368
http://bugzilla.audacityteam.org/show_bug.cgi?id=368
2013-10-07 23:46:41 +00:00
martynshaw99 4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
v.audacity 412b81392c This is the only possible null pointer deref found by cppcheck scan on src that I think is worth making failsafe. 2011-11-10 07:37:50 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00