13
0
Commit Graph

5254 Commits

Author SHA1 Message Date
63745512bc Call setup_libpbd_enums in PBD::init for portability 2013-08-13 20:15:47 +10:00
1db894f886 Call Gio::init from PBD::init instead of ARDOUR::init
PBD needs Gio for PBD::copy_file and perhaps others
2013-08-13 20:15:47 +10:00
55c6d4f2be Call PBD::init in ARDOUR::init and PBD::cleanup in ARDOUR::cleanup 2013-08-13 20:15:47 +10:00
29193c76cc Add PBD::init and PBD::cleanup
A bit of refactoring to move initialization of libpbd into libpbd
rather than rely on "client" code(ui,libardour,tests etc) to do it
2013-08-13 20:15:47 +10:00
9d340af10d Prevent libardour from being initialized more than once
This is not thread safe of course, it is not intended to be.

This was implemented as at one stage ARDOUR::init was being called multiple
times in the testsuite which was causing a subtle bug that took some
time to track down.
2013-08-13 20:15:47 +10:00
d51eba1162 Change ARDOUR::init return type to bool type for success/failure 2013-08-13 20:15:47 +10:00
4c4376d5dd fix thinko in 5dee49e19 2013-08-11 17:26:34 +02:00
116694a2cb fix 5dee49e19 (32/64 bit unsigned int compatibility) 2013-08-11 17:19:04 +02:00
5dee49e194 make LV2 communication buffers independent from jack-midi buffer-size
fixes issues with plugin communication that are common with
jack1 use due to its very small midi-buffers.
2013-08-11 15:10:41 +02:00
a1370f83db fix compiler warning 2013-08-07 15:57:29 +02:00
f5c52f500a Timecode: fix subframe rounding
if sub-frames are used, frames are rounded up for the later half of
a sub-frame.  e.g. @48KSPS, 25fps, 100 subframes per frame
audio-samples >=1910 already yield 00:00:00:01
2013-08-04 16:22:00 +02:00
976fc86811 fix no-roll LTC encoder, honor locates when transport is stopped 2013-08-04 16:13:43 +02:00
efc46f1553 make master-meter in toolbar optional 2013-08-04 00:06:29 +02:00
91e0e0f9f8 advance track's play-position even if processing is locked
fixes
  * http://tracker.ardour.org/view.php?id=5628
  * http://tracker.ardour.org/view.php?id=5561
2013-08-03 21:35:19 +02:00
b14d9a6451 properly handle port removal in route.
bug:
 - add midi track
 - add additional midi port
 - remove additional midi port
 - press play
 -> crash

because..

ARDOUR::MidiTrack::roll's route_buffer still has 2 midi-channels. This is
because processor_max_streams was not updated (no plugins added/removed)
fill_buffers_with_input() eventually asserts when trying to get the 2nd
(nonexistant) midi port via ARDOUR::PortSet::nth_midi_port() in
 ARDOUR::PortSet::port().
2013-08-03 13:44:37 +02:00
0eb5b7d1ab Merge branch 'midiclock' of https://github.com/axetota/ardour 2013-08-03 01:37:25 +02:00
Michael Fisher
e82574de05 Send and Read MIDI Positions the right way 2013-08-02 18:23:36 -05:00
99fb7346f0 on session-load: skip output-change-handler until IOs are restored
fixes loading a session with tracks that have more input-ports
than output-ports.

the problem:

input -ports are added first, when added, IO::ensure_port() emits
IOChange::ConfigurationChanged which in turn triggers the route to
allocate corresponding output ports.

Due to this callback the output-ports were created before the actual
output-port-configuration and plugin-configuration from the
session-state was parsed and set.
2013-08-03 00:51:08 +02:00
23eba1cc39 disallow invalid port-removal
do not allow port-removal if the port would be re-added immediately
after that again because the main-delivery actually needs it.

As a side effect this prevents this crash:

 * create a stereo-track, then remove one output
  -> unhandled exception "AudioEngine::PortRegistrationFailure&"

 The problem:
 - the port is removed from the RCU ports list,
   but Port::drop() (which calls jack_port_unregister) is only called
   from the Port's destructor at some later time.
   (because a reference to the port still exists elsewhere)
 - the jack-port is not yet removed.
 - meanwhile Delivery::configure_io comes along and notices that
   there are more audio-buffers than ports and tries to re-register the port.
 - but the port still exists in jack, so it fails and throws an exception
   ...which is not handled.
2013-08-03 00:51:07 +02:00
94f366190e fix typos in display of error message about an LV2 plugin preset 2013-08-02 12:50:52 -04:00
Michael Fisher
71c26e2820 Resolve duplicate symbol 'cocoa_open_uri' on OSX builds.
cocoa_open_uri.mm was being added to the source list
twice and also compiling twice. This patch enusres it is
only added once.
2013-08-02 12:01:47 -04:00
Michael Fisher
5143a42b31 Midi clock housekeeping 2013-08-02 08:59:32 -05:00
Michael Fisher
7ad81b7b4f Make Session::send_song_position_pointer a no-op 2013-08-02 08:59:32 -05:00
Michael Fisher
5555f5ccf7 Revamp clock processing so it uses an internal frame reference.
MidiClockTicker::Position managed by boost::scoped_ptr
2013-08-02 08:59:32 -05:00
Michael Fisher
18490878b4 WIP - Experimenting with an alternative clock generating algo
- Transport debug output (tracing where transport_frame
      is updated
2013-08-02 08:59:32 -05:00
Michael Fisher
6ffdeaa9f8 - Send position data from internal position class
- Proper midi beat conversions for all time signatures
- Disable responding to Session::PositionChanged in place
  of Session::Located.
2013-08-02 08:59:32 -05:00
Michael Fisher
6088446d8f Test code removal... 2013-08-02 08:59:32 -05:00
Michael Fisher
b8964f7b1b MIDI Clock - Shuffling locate code (not actually used yet)
- Subscribe to Session::Locate to detect seeks
- Shuffle Mclk locating computations into a separate private class
2013-08-02 08:59:32 -05:00
Michael Fisher
d882b03f7d Stop compiler warning about NSURL 2013-08-02 08:59:32 -05:00
bfd50cdeb0 rework MIDI [processor|plugin] chain
* forward midi-data around plugins that have no MIDI-out
* allow to insert plugins with no MIDI-input at a point with one MIDI-channel

This works because excess ports (both plugin and route) remain
unconnected and use scratch-buffers.

Tested with LV2, LXVST and LADSPA.
(AU plugins with variable in/out retain the old behavior, no bypass)

fixes http://tracker.ardour.org/view.php?id=5630
2013-08-02 03:39:00 +02:00
28f3d76e7c remove an identical odd namespacing typo 2013-08-01 10:46:22 -04:00
6a18103800 remove odd namespacing typo 2013-08-01 10:44:34 -04:00
4dc74ae2ea use zeroed scratch buffers for "silent" plugin runs
Plugins rewrite the buffer data in-place and some plugins
can produce output even when fed with silence.

Hence, during a PluginInsert::silence() run a plugin can
inject data into the "silent" buffers which causes side-effects.

Kudos to Chris 'oofus' Goddard for finding this issue.
2013-08-01 00:35:24 +02:00
7a02d9e08d clean up some valgrid "Uninitialised value was created by a heap allocation" wanings 2013-07-31 19:29:20 +02:00
ef0c4ed0e6 fix typo in c212c16eb 2013-07-31 15:24:46 +02:00
b5a2b4e84e initialize some uninitialized values 2013-07-31 15:22:51 +02:00
c212c16eb8 catch assert() 2013-07-31 15:17:22 +02:00
097d851730 LV2 - use scratch buffers to scratch :) 2013-07-31 14:45:02 +02:00
1c08b910f0 another amend to 00f26394a9 2013-07-31 14:21:40 +02:00
e8dc221191 fix stupid copy/paste error in 00f26394a9 2013-07-31 02:00:31 +02:00
476da4f3df minimize meter-peak re-draw area 2013-07-31 01:59:50 +02:00
ab7842edfd RMS meter: remove unused peak-detection 2013-07-30 20:22:31 +02:00
00f26394a9 use dedicated buffers for route (and track)
"scratch buffers are by definition scratch and their contents are undefined at all times"
"silent buffers are by definition all-zero and should not be used for real data"

But track & route were using those for actual data; plugins (which may run
in the same thread and may get the same buffers) use them for scratch thereby
overwriting real data.

In particular get_silent_buffers() (used by LadspaPlugin::connect_and_run)
clears the buffer which can holds real data:
e.g. via  Route::passthru_silence() -> plugin1 -> plugin2 (clears output of plugin1)
2013-07-30 16:55:33 +02:00
4af022c7f6 Revert "fix issue with generator plugins and no-roll disk monitoring"
This reverts commit bd34ab04cd.
2013-07-30 03:02:45 +02:00
bd34ab04cd fix issue with generator plugins and no-roll disk monitoring 2013-07-30 02:27:06 +02:00
47ec32fa15 Merge branch 'clang-rebased' of https://github.com/axetota/ardour 2013-07-29 16:03:50 -04:00
Michael Fisher
6fd7ec3fc9 Return an empty string instead of a bool 2013-07-29 14:43:12 -05:00
Michael Fisher
cdc9d95e92 Cast param for std::time to a pointer of time_t
- bleeding clang (trunk 186535 v3.4) fails here
2013-07-29 14:43:12 -05:00
Michael Fisher
a8456b3766 Proper OSX/CLANG/CXX11 support in stl_delete.h
- replaces fix in 066df0d218
- Check if _LIBCPP_VECTOR is defined for vector_delete.
  This is defined in libc++'s headers which Apple is using
  instead of libstdc++
2013-07-29 14:43:11 -05:00
Michael Fisher
c442fea139 Housekeeping, code style 2013-07-29 20:05:11 +02:00