ardour.git
8 years agoclean up of displayIfNeeded hack code
Paul Davis [Fri, 29 Apr 2016 12:09:27 +0000 (08:09 -0400)]
clean up of displayIfNeeded hack code

Remove most debug output (not all). Rename variables and functions. Add comments

8 years agosave custom favorite plugin order (revert when merging VCA2)
Robin Gareus [Thu, 28 Apr 2016 23:39:39 +0000 (01:39 +0200)]
save custom favorite plugin order (revert when merging VCA2)

8 years agoadd Lua DSP plugin category
Robin Gareus [Thu, 28 Apr 2016 23:40:06 +0000 (01:40 +0200)]
add Lua DSP plugin category

8 years agoremove "Lua DSP Proc" context meuu
Robin Gareus [Thu, 28 Apr 2016 23:36:31 +0000 (01:36 +0200)]
remove "Lua DSP Proc" context meuu

8 years agoinclude lua processors in plugin-selector
Robin Gareus [Thu, 28 Apr 2016 23:26:46 +0000 (01:26 +0200)]
include lua processors in plugin-selector

8 years agodon't special case lua processors, use plugin-manager
Robin Gareus [Fri, 29 Apr 2016 00:57:42 +0000 (02:57 +0200)]
don't special case lua processors, use plugin-manager

8 years agoclever tricks with code swizzling to slow down errant plugin GUIs for AU
Paul Davis [Thu, 28 Apr 2016 22:41:50 +0000 (18:41 -0400)]
clever tricks with code swizzling to slow down errant plugin GUIs for AU

This commit swizzles (replaces) NSView::displayIfNeeded to allow us to stop redraws of plugin
windows if the Glib idle timer fires less often then every 40msec. The next 10 plugin redraws
(for all plugin windows combined) will be skipped. Heuristics will likely need some adjustments

8 years agoconsolidate and re-order luasession code
Robin Gareus [Thu, 28 Apr 2016 19:38:09 +0000 (21:38 +0200)]
consolidate and re-order luasession code

8 years agoflush pending Session Events at session close
Robin Gareus [Thu, 28 Apr 2016 19:37:18 +0000 (21:37 +0200)]
flush pending Session Events at session close

This prevents a memory leak: The session is closed.
The session-butler drops memory pool trash. The Engine keeps running.

Once the AudioEngine is taken down (sample-rate switch, or at exit),
the backend process-thread is terminated but there is no trash-can anymore.

If there are unprocessed SessionEvents, this calls
free_per_thread_pool() -> cp->parent()->add_to_trash (cp).
"parent()" in this case the trash-can the butler emptied.

8 years agofix a deadlock with jack2 when inserting a plugin adds ports.
Robin Gareus [Thu, 28 Apr 2016 19:15:26 +0000 (21:15 +0200)]
fix a deadlock with jack2 when inserting a plugin adds ports.

When adding a processor, the processor may add ports leading to
a call to jack_port_register(). while Ardour holds a WritertLock on the
processor-list (this commit removes this WriterLock).

with jack2 that results in a graph-reorder callback (WHY?)

jack2 issues that graph-reorder in a separate thread BUT
port-registration does not return until the graph-reorder is complete.

On Ardour's side, graph_reordered() calls Session::resort_routes ()
which eventually checks Route::direct_feeds_according_to_reality()
which needs a ReadLock on the processor-list to check I/O.

Since jack_port_register() does not return, this constitutes a deadlock.

THE ACTUAL PROBLEM IS JACK2's THREAD DESIGN!
Why does jack_port_register() trigger a graph-order in jack2?
No connections are made.
..and why does it block jack_port_register() from returning if
that graph-order callback is in a different thread?
http://pastebin.com/DZANXJLz

8 years agoadd a debug message for LV2 per port buffer allocation
Robin Gareus [Thu, 28 Apr 2016 10:27:53 +0000 (12:27 +0200)]
add a debug message for LV2 per port buffer allocation

8 years agofor mixed-i/o show HW ports of both types in the matrix
Robin Gareus [Thu, 28 Apr 2016 00:52:05 +0000 (02:52 +0200)]
for mixed-i/o show HW ports of both types in the matrix

e.g. sidechain inputs with audio and midi.

8 years agoremove unnecessary lines+changes
Paul Davis [Thu, 28 Apr 2016 00:14:10 +0000 (20:14 -0400)]
remove unnecessary lines+changes

8 years agofix logic bomb
Paul Davis [Thu, 28 Apr 2016 00:12:15 +0000 (20:12 -0400)]
fix logic bomb

8 years agoif built on OS X without live resizing features, make AU plugin windows non-user...
Paul Davis [Wed, 27 Apr 2016 23:59:28 +0000 (19:59 -0400)]
if built on OS X without live resizing features, make AU plugin windows non-user-resiable

8 years agoadd a new configure-time for Cocoa live resizing macros
Paul Davis [Wed, 27 Apr 2016 23:58:54 +0000 (19:58 -0400)]
add a new configure-time for Cocoa live resizing macros

These were added in 10.6 but we're trying to be nice and look for the feature,
not some version

8 years agoanother attempt to use platform-specific path for the default VST path
Ben Loftis [Wed, 27 Apr 2016 22:39:38 +0000 (17:39 -0500)]
another attempt to use platform-specific path for the default VST path

8 years agoamend c1c81a239c after testing
Robin Gareus [Wed, 27 Apr 2016 21:52:34 +0000 (23:52 +0200)]
amend c1c81a239c after testing

8 years agosome linuxVST GUI details: initialize lock, add a note.
Robin Gareus [Wed, 27 Apr 2016 21:33:28 +0000 (23:33 +0200)]
some linuxVST GUI details: initialize lock, add a note.

8 years agopin connection GUI for variable I/O plugins
Robin Gareus [Wed, 27 Apr 2016 21:32:40 +0000 (23:32 +0200)]
pin connection GUI for variable I/O plugins

8 years agoallow to customize variable i/o plugin inputs
Robin Gareus [Wed, 27 Apr 2016 21:32:00 +0000 (23:32 +0200)]
allow to customize variable i/o plugin inputs

8 years agofix default 64bit Windows VST path ( untested )
Ben Loftis [Wed, 27 Apr 2016 19:56:19 +0000 (14:56 -0500)]
fix default 64bit Windows VST path ( untested )

8 years agochange ordering of origin-move and window-resize for AU plugins
Paul Davis [Wed, 27 Apr 2016 19:47:43 +0000 (15:47 -0400)]
change ordering of origin-move and window-resize for AU plugins

8 years agoprobable fix for 64bit VST signal latency
Robin Gareus [Wed, 27 Apr 2016 19:44:40 +0000 (21:44 +0200)]
probable fix for 64bit VST signal latency

8 years agoshow debug out when AU NSView doesnt get moved
Paul Davis [Wed, 27 Apr 2016 19:23:09 +0000 (15:23 -0400)]
show debug out when AU NSView doesnt get moved

8 years agoOSC: Fix Solo to work with both SIP and Listen.
Len Ovens [Wed, 27 Apr 2016 16:06:46 +0000 (09:06 -0700)]
OSC: Fix Solo to work with both SIP and Listen.

8 years agotweak LV2 atom buffer allocation strategy
Robin Gareus [Wed, 27 Apr 2016 12:45:40 +0000 (14:45 +0200)]
tweak LV2 atom buffer allocation strategy

Allow to re-use Midi buffers for GUI communication. Honor
resize-port extension for all Atom Sequence buffers.
(following example of http://lv2plug.in/book/#_sampler)

8 years agosignificant reworking of AudioUnit window resizing.
Paul Davis [Wed, 27 Apr 2016 04:02:59 +0000 (00:02 -0400)]
significant reworking of AudioUnit window resizing.

Tested on Apple Multiban Comp, Apple Dynamics Proc, AU Sampler, Zebra2 and Zebralette.

Still have a 1-2 pixel white border at lower and right edge after window is dragged larger.

Also, debug output.

8 years agoadd the concept of a "state mask" that determines what info a WindowProxy will save
Paul Davis [Wed, 27 Apr 2016 04:01:13 +0000 (00:01 -0400)]
add the concept of a "state mask" that determines what info a WindowProxy will save

8 years agomake -D VSTCallbacks readable
Robin Gareus [Tue, 26 Apr 2016 23:44:55 +0000 (01:44 +0200)]
make -D VSTCallbacks readable

8 years agocanvas tooltips, too
Robin Gareus [Tue, 26 Apr 2016 23:24:37 +0000 (01:24 +0200)]
canvas tooltips, too

8 years agore-enable "Show Tooltip" preference (needs testing on all platforms)
Robin Gareus [Tue, 26 Apr 2016 23:08:31 +0000 (01:08 +0200)]
re-enable "Show Tooltip" preference (needs testing on all platforms)

8 years agoalso hide persistent tooltips
Robin Gareus [Tue, 26 Apr 2016 23:07:53 +0000 (01:07 +0200)]
also hide persistent tooltips

debatable, since most of them are not "help/tool info" but rather
"current value display".
Then again tooltip is tooltip and can be annoying or not wanted.

8 years agotowards fixing optional tooltips
Robin Gareus [Tue, 26 Apr 2016 23:06:01 +0000 (01:06 +0200)]
towards fixing optional tooltips

Editor::parameter_changed() is not called for UIConfig changes.
"use-tooltips" was never triggered.

8 years agoremove duplicate "bld.install_files" call
Robin Gareus [Tue, 26 Apr 2016 20:45:06 +0000 (22:45 +0200)]
remove duplicate "bld.install_files" call

8 years agodeploy all *.colors files in binary bundles
Robin Gareus [Tue, 26 Apr 2016 20:42:28 +0000 (22:42 +0200)]
deploy all *.colors files in binary bundles

8 years agoinitialize output data ports for cases where the plugin is not run
Robin Gareus [Tue, 26 Apr 2016 20:21:00 +0000 (22:21 +0200)]
initialize output data ports for cases where the plugin is not run

(e.g. load session with inactive track, or instantiate an audio plugin
on a midi track before the synth)

8 years agolet GMainContext clean up after us.
Robin Gareus [Tue, 26 Apr 2016 17:45:06 +0000 (19:45 +0200)]
let GMainContext clean up after us.

this fixes a potential crash in
AsyncMIDIPort::~AsyncMIDIPort() -> CrossThreadChannel::~CrossThreadChannel()

8 years agoport 93eac8b0 to ALSA and CoreAudio
Robin Gareus [Tue, 26 Apr 2016 16:19:48 +0000 (18:19 +0200)]
port 93eac8b0 to ALSA and CoreAudio

8 years agoallow to duplicate tracks with sends or load templates with sends/inserts
Robin Gareus [Tue, 26 Apr 2016 16:15:53 +0000 (18:15 +0200)]
allow to duplicate tracks with sends or load templates with sends/inserts

8 years agolua snippet to interact with portengine
Robin Gareus [Tue, 26 Apr 2016 15:51:48 +0000 (17:51 +0200)]
lua snippet to interact with portengine

8 years agoimplement missing PortManager methods and lua-bind them
Robin Gareus [Tue, 26 Apr 2016 12:35:47 +0000 (14:35 +0200)]
implement missing PortManager methods and lua-bind them

8 years ago#define HAVE_JACK_PORT_RENAME when building with MSVC
John Emmas [Tue, 26 Apr 2016 14:02:20 +0000 (15:02 +0100)]
#define HAVE_JACK_PORT_RENAME when building with MSVC

This means needing to build against libjack v1.9.11 (or later) although that's probably not a bad thing.

8 years agoUse 'const_iterator' to prevent MSVC from complaining
John Emmas [Tue, 26 Apr 2016 13:58:16 +0000 (14:58 +0100)]
Use 'const_iterator' to prevent MSVC from complaining

8 years agoremove the splash-screen when changing sessions
Robin Gareus [Tue, 26 Apr 2016 11:03:47 +0000 (13:03 +0200)]
remove the splash-screen when changing sessions

ARDOUR_UI::load_session()'s loading_message() shows the splash in
all cases. But only the initial ARDOUR_UI::starting() does destroy it.

In some cases we got away because the Engine Dialog pops back the
splash and the dialog is never destroyed (only hidden).
It's not until ~Dialog that the splash is displayed again (if it exists).

8 years agodon't show engine dialog when loading a session..
Robin Gareus [Tue, 26 Apr 2016 10:56:52 +0000 (12:56 +0200)]
don't show engine dialog when loading a session..

..and the engine is running at the desired samplerate

8 years agostyleguide #10
Robin Gareus [Tue, 26 Apr 2016 02:02:58 +0000 (04:02 +0200)]
styleguide #10

sigc keeps a reference to the shared_ptr, AsyncMidiPorts were never
unregistered, causing issues when loading a new session w/o Engine
restart.

8 years agokeep portmap & portindex in sync when renaming ports
Robin Gareus [Tue, 26 Apr 2016 00:26:20 +0000 (02:26 +0200)]
keep portmap & portindex in sync when renaming ports

Fixes crash on session re-load (introduced in 800c8182 and fde99e68)

8 years agoPortManager lua bindings (to debug lingering ports)
Robin Gareus [Tue, 26 Apr 2016 00:21:09 +0000 (02:21 +0200)]
PortManager lua bindings (to debug lingering ports)

8 years agotweak location-UI layout (right-align checkboxes & buttons)
Robin Gareus [Mon, 25 Apr 2016 17:55:00 +0000 (19:55 +0200)]
tweak location-UI layout (right-align checkboxes & buttons)

8 years agoslightly improved location-UI layout
Robin Gareus [Mon, 25 Apr 2016 17:39:59 +0000 (19:39 +0200)]
slightly improved location-UI layout

8 years agoNO-OP whitespace
Robin Gareus [Mon, 25 Apr 2016 16:49:42 +0000 (18:49 +0200)]
NO-OP whitespace

8 years agoreturn of the location GoTo Button
Robin Gareus [Mon, 25 Apr 2016 16:17:35 +0000 (18:17 +0200)]
return of the location GoTo Button

Despite the tooltip, middle-click to locate is not very discoverable,
and tricky to not-available on MacBooks.

8 years agocompile-time test for useful ASL API
Paul Davis [Mon, 25 Apr 2016 13:37:12 +0000 (09:37 -0400)]
compile-time test for useful ASL API

8 years agoremove unused code
Paul Davis [Sun, 24 Apr 2016 16:41:25 +0000 (12:41 -0400)]
remove unused code

8 years agofix copy/paste typo in in 5e0f0fc
Robin Gareus [Mon, 25 Apr 2016 12:29:12 +0000 (14:29 +0200)]
fix copy/paste typo in in 5e0f0fc

8 years agoupdate luadoc tools
Robin Gareus [Mon, 25 Apr 2016 11:49:43 +0000 (13:49 +0200)]
update luadoc tools

8 years agoupdate [lua bindings] documentation
Robin Gareus [Mon, 25 Apr 2016 11:06:40 +0000 (13:06 +0200)]
update [lua bindings] documentation

8 years agolua action details (button sensitivity, text ellipsis)
Robin Gareus [Mon, 25 Apr 2016 10:56:21 +0000 (12:56 +0200)]
lua action details (button sensitivity, text ellipsis)

8 years agoadd missing header for luadoc
Robin Gareus [Mon, 25 Apr 2016 00:35:45 +0000 (02:35 +0200)]
add missing header for luadoc

8 years agoadd optional buttons to trigger lua scripted actions.
Robin Gareus [Sun, 24 Apr 2016 22:16:08 +0000 (00:16 +0200)]
add optional buttons to trigger lua scripted actions.

8 years agoupdate keyeditor when action label changes
Robin Gareus [Sun, 24 Apr 2016 20:20:44 +0000 (22:20 +0200)]
update keyeditor when action label changes

8 years ago..and CoreAudio.
Robin Gareus [Sun, 24 Apr 2016 18:45:50 +0000 (20:45 +0200)]
..and CoreAudio.

8 years agoO(log(n)) port and connection lookup for ALSA
Robin Gareus [Sun, 24 Apr 2016 18:45:37 +0000 (20:45 +0200)]
O(log(n)) port and connection lookup for ALSA

8 years agonow with C++98 compat
Robin Gareus [Sun, 24 Apr 2016 16:34:31 +0000 (18:34 +0200)]
now with C++98 compat

8 years agodelayline: use boost::shared_array
Robin Gareus [Sun, 24 Apr 2016 16:23:14 +0000 (18:23 +0200)]
delayline: use boost::shared_array

8 years agooptimize port lookup, adding/removing/reconnecting routes
Robin Gareus [Sun, 24 Apr 2016 16:24:06 +0000 (18:24 +0200)]
optimize port lookup, adding/removing/reconnecting routes

xxxAudioBackend::connected_to() is called O(N^2) when building the graph.
Mitigate this by using an O(log(N)) lookup.

This duplicates the storage (both set and map and both are kept in sync.
Changing this to a boost:bidirectional might be nice, before updating
other backends.

8 years agoreduce debug-build overhead.
Robin Gareus [Sun, 24 Apr 2016 15:35:21 +0000 (17:35 +0200)]
reduce debug-build overhead.

8 years agowe need the process lock after all..
Robin Gareus [Sun, 24 Apr 2016 14:06:38 +0000 (16:06 +0200)]
we need the process lock after all..

8 years agorestore sending stderr/stdout to the console
Paul Davis [Sun, 24 Apr 2016 15:24:34 +0000 (11:24 -0400)]
restore sending stderr/stdout to the console

This is done unconditionally right now for any ARDOUR_BUNDLED case. Need to
find a conditional, so that we can run from the command line/inside a debugger.
The -psn_XXXX argument will likely work

8 years agoadd debug facilities to arlua (valgrind, callgrind) to test libardour
Robin Gareus [Sun, 24 Apr 2016 12:40:31 +0000 (14:40 +0200)]
add debug facilities to arlua (valgrind, callgrind) to test libardour

8 years agosome new lua-bindings and session-lua (creating sessions)
Robin Gareus [Sun, 24 Apr 2016 12:39:58 +0000 (14:39 +0200)]
some new lua-bindings and session-lua (creating sessions)

8 years agoNO-OP whitespace
Robin Gareus [Sun, 24 Apr 2016 12:39:22 +0000 (14:39 +0200)]
NO-OP whitespace

8 years agofix crash when loading a session with non-default clock modes.
Robin Gareus [Sun, 24 Apr 2016 12:39:12 +0000 (14:39 +0200)]
fix crash when loading a session with non-default clock modes.

set_mode() emits ModeChanged which results in save_extra_xml().
If this happens during session-load, the XML iterator is invalidated.

8 years agofix mismatched delete/delete[]
Robin Gareus [Sun, 24 Apr 2016 12:16:15 +0000 (14:16 +0200)]
fix mismatched delete/delete[]

8 years agosome notes on mem-leaks...
Robin Gareus [Sun, 24 Apr 2016 11:22:15 +0000 (13:22 +0200)]
some notes on mem-leaks...

8 years agohand over automationlist undo state ownership (mem-leak)
Robin Gareus [Sun, 24 Apr 2016 11:07:07 +0000 (13:07 +0200)]
hand over automationlist undo state ownership (mem-leak)

8 years agoplug some memory leaks in libardour
Robin Gareus [Sun, 24 Apr 2016 12:41:07 +0000 (14:41 +0200)]
plug some memory leaks in libardour

8 years agodo NOT use Glib::ustring unless you know that the contents are UTF-8 AND that you...
Paul Davis [Sun, 24 Apr 2016 04:37:53 +0000 (00:37 -0400)]
do NOT use Glib::ustring unless you know that the contents are UTF-8 AND that you need to iterate glyph by glyph

This fixes a Glib::ConvertError that occured when using Glib::ustring::operator<<
inside a compose operation. This implicitly uses Glib::locale_from_utf8(), and if the string
is not legal UTF-8, an exception will be thrown.

std::string should be used EVERYWHERE unless glyph-by-glyph iteration is required. This is
very rare in the Ardour codebase, so you really shouldn't see Glib::ustring anywhere. The
main exception is handling user-input for a few specific cases.

8 years agofurther tweaks to session close
Robin Gareus [Sun, 24 Apr 2016 00:51:23 +0000 (02:51 +0200)]
further tweaks to session close

8 years agolua bindings for track/bus and session creation
Robin Gareus [Sat, 23 Apr 2016 22:25:34 +0000 (00:25 +0200)]
lua bindings for track/bus and session creation

8 years agoDisconnect Signals before dropping ports
Robin Gareus [Sat, 23 Apr 2016 22:24:43 +0000 (00:24 +0200)]
Disconnect Signals before dropping ports

significantly speeds up session close

8 years agodelegate port-connections to low priority thread.
Robin Gareus [Sat, 23 Apr 2016 20:11:48 +0000 (22:11 +0200)]
delegate port-connections to low priority thread.

This prevents a deadlock with (some versions) jack:
 * add new instrument track with instrument
 * configure processors (takes processor lock)
 * add I/Os (delivery) -> create ports
 * auto-connect ports
 * jack port-connect -> jack graph re-order
 * Ardour graph-re-order
 * needs processor lock (to check sends)

8 years agosave-as/snapshot tweaks:
Robin Gareus [Sat, 23 Apr 2016 12:45:19 +0000 (14:45 +0200)]
save-as/snapshot tweaks:

* allow to take snapshots and save-as read-only session.
* change ambiguous "Save as" window title for "Snapshot & Switch"
* start save-as in configured session-dir

8 years agofix typo in config variable
Robin Gareus [Fri, 22 Apr 2016 22:01:28 +0000 (00:01 +0200)]
fix typo in config variable

8 years agofix send-id "0" when loading session
Robin Gareus [Fri, 22 Apr 2016 21:36:41 +0000 (23:36 +0200)]
fix send-id "0" when loading session

Send::set_state() unsets the current send-id before setting
the new one, but by default _bitset defaults to zero.
This may lead to unset an existing send "0"

8 years agofix single-bus AU rendering & related updates
Robin Gareus [Fri, 22 Apr 2016 20:04:48 +0000 (22:04 +0200)]
fix single-bus AU rendering & related updates

8 years agoinvalidate AU cache on re-scan
Robin Gareus [Fri, 22 Apr 2016 19:10:04 +0000 (21:10 +0200)]
invalidate AU cache on re-scan

8 years agouse coreaudio wrapper
Robin Gareus [Fri, 22 Apr 2016 18:50:06 +0000 (20:50 +0200)]
use coreaudio wrapper

8 years agoPin Management UI tweaks for AU.
Robin Gareus [Fri, 22 Apr 2016 17:35:58 +0000 (19:35 +0200)]
Pin Management UI tweaks for AU.

8 years agoSingle instance AUs only, use variable i/o
Robin Gareus [Fri, 22 Apr 2016 17:35:38 +0000 (19:35 +0200)]
Single instance AUs only, use variable i/o

8 years agoAU multibus support
Robin Gareus [Fri, 22 Apr 2016 16:47:45 +0000 (18:47 +0200)]
AU multibus support

8 years agofix AU cache clear
Robin Gareus [Fri, 22 Apr 2016 15:31:08 +0000 (17:31 +0200)]
fix AU cache clear

8 years agoload presets for all instances
Robin Gareus [Fri, 22 Apr 2016 12:26:33 +0000 (14:26 +0200)]
load presets for all instances

8 years agoadd API to load plugin presets for all instances
Robin Gareus [Fri, 22 Apr 2016 12:24:45 +0000 (14:24 +0200)]
add API to load plugin presets for all instances

8 years agoClarify my XML error printout from yesterday (see previous commit)
John Emmas [Fri, 22 Apr 2016 06:18:15 +0000 (07:18 +0100)]
Clarify my XML error printout from yesterday (see previous commit)

8 years agoWhen logging XML error messages, make sure we don't accidentally log an empty message
John Emmas [Thu, 21 Apr 2016 15:45:15 +0000 (16:45 +0100)]
When logging XML error messages, make sure we don't accidentally log an empty message

Amends my previous commit #a7508a9c from 23rd July 2015. If the filename and/or line number were NULL, we could end up logging a message with no text!

8 years agoand now with proper closing bracket.
Robin Gareus [Wed, 20 Apr 2016 23:04:55 +0000 (01:04 +0200)]
and now with proper closing bracket.

8 years agotake MB dithering into account when stripping silence on export
Robin Gareus [Wed, 20 Apr 2016 23:02:18 +0000 (01:02 +0200)]
take MB dithering into account when stripping silence on export

8 years agodisable sidechain & manual cfg for MB & AU for now
Robin Gareus [Wed, 20 Apr 2016 20:36:03 +0000 (22:36 +0200)]
disable sidechain & manual cfg for MB & AU for now