13
0
Commit Graph

8333 Commits

Author SHA1 Message Date
c3430e5884 Cluster Frak String Reference 2015-03-08 02:51:09 +01:00
50041cb450 avoid non-integer loop conditions. 2015-03-08 02:01:48 +01:00
95631cdc25 properly handle empty CFStringRefs. 2015-03-08 01:40:39 +01:00
7edc7a8d28 CoreAudio: fix allocation alignment 2015-03-07 23:27:33 +01:00
de078a04e2 Fix LV2 preset deletion and clash between plugins.
Before this, LV2 preset deletion in Ardour was doubly broken: the wrong file
was being removed, and removing the correct file would only result in a broken
preset.  This change uses a new version of Lilv which has a more sophisticated
mechanism for preset deletion.

Also, fix "clashing" presets saved with the same name for different plugins, by
prefixing the plugin name to the bundle (this is now a recommendation in the
LV2 preset specification).
2015-03-07 14:54:03 -05:00
d47ad23fe8 no more gcc/ppc complaints 2015-03-07 16:10:45 +01:00
7af3fdb99a fix various -Wformat 2015-03-07 15:04:17 +01:00
f88e566576 fix copy/edit in 659a8a2 2015-03-07 14:50:02 +01:00
659a8a26ae fix latency report, take buffersize changes into account. 2015-03-07 14:35:32 +01:00
ce3adfd3d4 Hard Core Audio
* allow to change buffersizes
* subscribe to buffersize & samplerate changes
* add support for half-duplex devices.
* aggregate Devices (not yet used) code from JACK2
* unify deprecated API wrappers
* properly keep track of MIDI ports
* disable MidiI/O during freewheeling
* various small fixes & cleanup
2015-03-07 14:35:32 +01:00
e99599c7db Add some newly introduced sources to our MSVC project (libardour) 2015-03-07 12:30:22 +00:00
4b401d9e34 Add a missing 'typename' specifier to the declaration for 'Evoral::Sequence::set_notes()' 2015-03-07 12:29:15 +00:00
13bad670fa more ongoing work on the coreaudio backend
* audio port names
* latency compensation
* xrun reporting
* various fixes and cleanup
2015-03-06 23:26:05 +01:00
3b941fc0fa build system tweaks for coreaudio/waves-coreaudio 2015-03-06 23:26:05 +01:00
6b87e706eb cont’d work on the coreaudio backend & cleanup 2015-03-06 06:24:56 +01:00
408090adce Add MIDI readahead to options editor. 2015-03-05 18:48:33 -05:00
a8aae56d92 Handle edits while playing precisely.
This avoids stuck notes if active notes are edited, but without stopping all
active notes in the region on any edit as before.

This implementation injects note ons in places that aren't actually note
starts.  Depending on how percussive the instrument is, this may not be
desired.  In the future, an option for this would be an improvement, but there
are other places where "start notes in the middle" is a reasonable option.  I
think that should be handled universally if we're to do it at all, so not
considering it a part of this fix for now.
2015-03-05 17:30:31 -05:00
09f1571fc0 Clean up MidiPlaylist::read, kill copy-paste code.
Towards putting more advanced logic here, where two copies of everything will
get even more hairy.

The two cases of reading from one or many regions are not very different in the
read phase, the only difference is the target.  So, point a reference to the
appropriate target, use the same read code in either case, then sort/etc
afterwards only if necessary.
2015-03-05 17:11:24 -05:00
5bf90524df fix import of v2 session redirects: active or inactive 2015-03-05 12:48:30 -06:00
1089f19a4c create engine thread before sending notifications.
Fixes missing thread in Pool in session_process,
when switching backend threads (CoreAudio, Waves)
2015-03-05 16:46:20 +01:00
f6f64d3f81 get started on coreaudio/midi backend 2015-03-05 16:46:20 +01:00
2ab26bd86d fix another screwup/typo in 782dd70 2015-03-05 02:10:21 +01:00
7ef22e5e71 remove unused devel.variable in prev commit 2015-03-05 02:04:14 +01:00
782dd70875 alsa: implement timing callback 2015-03-05 01:59:59 +01:00
1acbd7c488 fix for previous checkin; should allow waves midi backend to work 2015-03-04 10:23:19 -06:00
e3dd226ffa Change order of midi entries so a new backend will default to a working midi system.
Needs testing on all platforms.
2015-03-03 15:57:08 -06:00
714677f036 Change order of midi entries so a new backend will default to a working midi system.
Needs testing on all platforms.
2015-03-03 15:52:44 -06:00
a2d1f894b0 recursive VST scans 2015-03-03 19:54:28 +01:00
cf7d5dbc2d recursive regexp file search. 2015-03-03 19:54:27 +01:00
a173c74f2d Adapt our MSVC projects to use our (newly re-built) libsuil 2015-03-03 14:51:59 +00:00
8e3ec4b9ab leave a ToDo note for the butler. 2015-03-02 23:13:19 +01:00
5cfa389978 explicitly close tmpfiles before unlink.
fixes issue on export tmpfiles remaining on windows
2015-03-02 23:12:06 +01:00
a5eb3bae87 add an explicit close function to sndfile
NB. if someday we want to switch back to upstream
SndfileHandle, we need to subclass wrap it.
(not sure what else is different, anyway)
2015-03-02 23:11:04 +01:00
9a30bfd0c6 use Xthreads in session butler.
(hopefully) fixes export randomly stalling on windows: 
dequeue_request() was a single request (no queue) on Windows.

Butler::queue_request() is called 
-> Butler goes to work..
-> while working, another request is queued
-> butler never sees this
-> deadlock
during Freewheeling/Export wait_until_finished()
waits for the 2nd request to be handled, and never returns.
2015-03-01 20:55:39 +01:00
d7727a77e0 Xthread: blocking read + non-blocking write mode.
Needed for switching the butler to use Crossthreads.
2015-03-01 20:49:55 +01:00
60388f975c tiny cleanup due to long comment in between. 2015-03-01 19:12:10 +01:00
0a6df4e521 fix typo in c936c97 2015-03-01 19:11:23 +01:00
380215a08c API to delete AU cache & blacklist 2015-02-28 15:52:28 +01:00
c936c973b5 AU blacklist 2015-02-28 15:52:28 +01:00
ee0826c823 AU fix potential endless loop during discovery 2015-02-28 15:52:28 +01:00
7a1baeee79 promote sustain pedal from meh to reasonable. 2015-02-28 15:52:28 +01:00
32e23db665 In libpbd the sources 'localeguard.cc/.h' and 'locale_guard.cc/.h' are essentially identical now - so let's remove the former pair which were only ever needed when building with MSVC
(should hopefully avoid future confusion !!)
2015-02-28 12:59:00 +00:00
3c3586a4e1 AU presets: allow to save & directly use. 2015-02-28 08:04:14 +01:00
60c39849cf include AU control outputs (as meters on generic UI) 2015-02-28 07:24:33 +01:00
1b0574540f automated toggles? yes we can! 2015-02-28 07:24:13 +01:00
b362f45738 fix AU generic GUI and automation lanes
Don’t include non-automatable params.
2015-02-28 07:23:45 +01:00
105ecfa464 fix routing midi data on export:
MidiPort::cycle_end() was never called, hence after the 
first cycle all midi buffers were assumed to be 
“mixed down” already.

this fixes 
Midi-track 1 -[midi]-> Midi-track2 synth -[audio]-> out
on export.
2015-02-28 05:49:16 +01:00
933e9c2919 Fix unnecessary const violation. 2015-02-27 14:21:45 -05:00
24efaa2992 likely fix for broken fades (imported from v2 sessions) 2015-02-27 11:31:56 -06:00
763a7c8161 potential fix for the_CLA reported problem: v2 fader values are lost if you are using a non-US locale 2015-02-27 11:31:55 -06:00
b11a18d226 fix generic GUI for AU.
Ardour only queries AU writable (or read+writable)
parameters, hence announce them as such.
2015-02-26 23:57:09 +01:00
7f27d658e1 annotate prev commit. 2015-02-25 00:43:58 +01:00
e38eb0613e no more AU warnings…
Ardour calls input_streams(), output_streams() to determine
if the plugin is about to be re-configured (old stream I/O count
!= new I/O count) and emit PluginIoReConfigure() if that’s true.

If the plugin has not been initialized (no format set), we can
safely assume that it will need to be reconfigured.

Forcing Audio=Midi=0 will do so.

The only time where the format is not yet set and hence the actual
channel count is still unknown) is during the first call to 
PluginInsert::configure_io().

At the time of writing, this all is a NOOP anyway! The only user
of the PluginIoReConfigure() signal is the GUI to update connection
lines…  and since the first PluginInsert::configure_io() happens 
during insertion before the plugin is painted and subscribed to 
PluginIoReConfigure(), this function could return any value.

Still 0,0 is just more appropriate than assuming mono audio in/out
and no midi.
2015-02-25 00:42:54 +01:00
6774aef412 AU synth. prefer stereo variant if available. 2015-02-24 18:31:35 +01:00
acd6810860 AU: fix return value reference 2015-02-23 02:49:37 +01:00
b75a826b9a fix return value on AU error in e070701 2015-02-22 23:44:23 +01:00
9359a157fa fix logical-op-parentheses 2015-02-22 23:38:42 +01:00
e070701f14 support AudioUnit Generators without global Channel Info 2015-02-22 23:37:18 +01:00
10e183f518 fix two other potential issues with leftover 32 bit integers when reading from sndfilesource.
It is less likely that these would cause issues because the
variables involved define the size of the data read, which
is almost certainly less than the 32 bit limit (i.e. they are
not positional). But to keep things clean and to keep questions
at bay, make them 64 bit values.
2015-02-22 11:12:11 -05:00
b40a305b5a fix incorrect use of int32_t for current position in file while writing to non-destructive sndfilesources 2015-02-22 11:12:11 -05:00
bf1d12708d dummy: add square wave frequency sweep generators 2015-02-21 05:05:48 +01:00
a2e4d6260c fix logic of Session::audio_source_name_is_unique() 2015-02-20 14:12:40 -05:00
7024232855 ensure that stub audio file sources are removed when we destroy a track 2015-02-20 14:12:40 -05:00
dcf69ab3e6 fix erroneous merge for wavesaudio backend 2015-02-20 13:21:44 -05:00
Valeriy Kamyshniy
d5e375f784 [Summary] In internal Waves backend API, switching sample time from 32 bits to 64 bits.
Conflicts:
	libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp
2015-02-20 13:05:43 -05:00
VKamyshniy
3b5da657af [Summary] In internal Waves backend API, switching sample time from 32 bits to 64 bits. Fixing logical inconsistency: None device always brought sample time=0 to the audio engine callback. 2015-02-20 13:03:09 -05:00
nick_m
5d5f83c56b The commit 3da9c3b740
wasn't the no-op it claimed to be.
2015-02-20 23:30:48 +11:00
b68a4e5cdc Normalize notes on all channels.
Probably.
2015-02-19 20:23:11 -05:00
450291adfc Fix record/import of note ons with velocity 0.
Best to just do this as early as possible to avoid having to deal with this
situation all over the code.

Also fixes violation of LV2 MIDI specification, which requires no such events
are delivered to plugins.
2015-02-19 18:38:30 -05:00
6fb4bd578e Don't allocate then discard notes on note off.
Silly to make a junk Note just to pass to append_note_off_unlocked, which just
uses the fields that are on the MIDIEvent anyway then throws it away.

Also explicitly dispatch to append_note_off_unlocked in the caller for note ons
with velocity 0 rather than make append_note_on_unlocked deal with it.
2015-02-19 18:38:30 -05:00
6a033a093b Remove unused ifdef gunk. 2015-02-19 18:38:30 -05:00
76f6ff178e fix incorrect type for Waves' backend's _sample_time_at_cycle_start 2015-02-19 18:23:17 -05:00
582138f280 change Audio backend sample time methods to use a 64 bit timeline 2015-02-19 17:44:01 -05:00
e148ee52ab add a nonsense-midi test sequence:
system:midi_capture_6 
duplicate on/off, zero-velocity note-on
2015-02-19 21:58:30 +01:00
b489385bf1 fix some static-analysis warnings 2015-02-19 20:37:58 +01:00
aea700fbc4 fix transport issues when loop-is-mode is off.
Session::unset_play_loop() needed to be a no-op if play loop was
already false, and this was exacerbated now that it potentially
schedules butler transport work.
2015-02-19 10:33:33 -05:00
3a63b785a9 rsynth: map note-on with zero velocity to note-off 2015-02-19 00:54:30 +01:00
c24bb4a8ee fix initialization order (sigh) 2015-02-18 12:00:36 -05:00
8c812a6df4 Revert "[Summary] Eliminated redundant marker update notification which lead to creation of huge amount of redundant session events"
This reverts commit 3dde9e969c.
2015-02-18 12:00:36 -05:00
2067163f7a Revert "fix indentation from previous commit and previous edits"
This reverts commit 449c9b675d.
2015-02-18 12:00:36 -05:00
58137b8326 try to restore original semantics for scheduling butler transport work in Session::locate() 2015-02-17 11:21:41 -05:00
b72d37a45f another required fix following recent cherry-picks from waves 2015-02-17 11:10:29 -05:00
GZharun
297ebd33bb [Summary] Blocked redundant skip marker (during skip ranges consolidation) updates which used to lead to unnecessary overhead and redundant session events
Conflicts:
	libs/ardour/ardour/session.h
	libs/ardour/session.cc
2015-02-17 10:57:56 -05:00
48fdb28153 mark session dirty when loop location is changed 2015-02-17 10:50:54 -05:00
449c9b675d fix indentation from previous commit and previous edits 2015-02-17 10:47:22 -05:00
GZharun
3dde9e969c [Summary] Eliminated redundant marker update notification which lead to creation of huge amount of redundant session events 2015-02-17 10:43:05 -05:00
GZharun
5a8270373a [Summary] Fixed loop processing in cases when loop is moved/resized
[Reviewed by] REQUIRED REVIEW FROM PAUL DAVIS
2015-02-17 10:37:35 -05:00
b3e7c88988 fixes for desirable playback when using seamless looping.
Try to make sure that we appropriately reset and refill track
buffers whenever we enter/leave loop playback,and whenever
we locate. In addition, if we start playing somewhere other
than the loop range while loop is enabled, then the first
time we hit the loop end, set up the track buffers.

Conflicts:
	libs/ardour/session_transport.cc
2015-02-16 19:35:37 -05:00
8a93a87db0 remove lib versioning for internal plugins
Those objects do not have a versioned API by themselves.
This fixes issues with duplicate deployment (OSX, Linux bundles: cp) and
ardour listing control-surfaces multiple times (file index plugin dir).
2015-02-16 17:32:56 +01:00
2a04ff8641 Add TestUI class to properly handle EventLoop invalidation
This fixes the programming error: Session RT event... warnings
while running ardour tests
2015-02-15 15:05:22 +10:00
964c04eec5 Move TestReceiver class in libardour tests into own header file 2015-02-15 13:48:53 +10:00
d9b4c6be6a Add a few test util functions and refactor existing test code 2015-02-15 12:53:41 +10:00
deb4687d5d fix testPathIsWithin unit-test:
* use absolute path
* fix copy/paste typo: bar->jim for symlink test
2015-02-14 05:50:40 +01:00
7f0cdc3967 hide terminal window for windows vst scanner 2015-02-14 05:50:40 +01:00
5b3ff655f1 Fix LV2 UIs with spacey paths (e.g. Pianoteq). 2015-02-13 22:00:38 -05:00
7a99bc5373 fix seamless looping after a locate out of the loop.
Something, somewhere has to tell tracks to refill their buffers with
the special loop-data-only magic
2015-02-13 18:42:41 -05:00
aa5cf04ca6 correctly set track loop status when locating away from loop range (and later, when coming back to the loop)
Conflicts:
	libs/ardour/ardour/session.h
	libs/ardour/session.cc
	libs/ardour/session_transport.cc
2015-02-13 17:23:50 -05:00
cb3961d953 Add a test for the constrained cubic interpolation of Evoral::Curve
Add a test, based on the worked example in www.korf.co.uk/spline.pdf, for
the constrained cubic spline interpolation.

The delta values for the float comparisons are rather arbitrary, I'm sorry
to say: they're basically chosen so that everything passes.
2015-02-13 12:25:51 +00:00
bd6ef95989 add accessor methods for single_exposure 2015-02-12 11:35:35 -06:00
b8ec035b24 _single_exposure is now a member variable for each GtkCanvas.
Gtk coalesces multiple exposes into a single combined rect.
If _single_exposure is disabled, we break apart the individual expose rects for the canvas rendering.
2015-02-12 11:35:35 -06:00
180b705643 Fix whitespace in pbd/debug.h 2015-02-12 22:10:51 +10:00
0550ec31bc Add local PwdReset class to reset pwd in event of test failure
This fixes subsequent tests that rely on pwd but not PBD::path_is_within
breakage caused by commit 2689848e
2015-02-12 20:06:47 +10:00
9a7ae1ad99 Add some more test assertions so that tests fail when they should 2015-02-12 20:06:47 +10:00
0f0aebf26b remove naive attempt to avoid drawing first vertical pixel line of Canvas::WaveView
And add commented out attempt at more subtle attempt to get it right
2015-02-11 21:59:38 -05:00
a992a2e6e0 simplify Canvas::Rectangle rendering to avoid unnecessary nonsense, and remove TimeRectangle 2015-02-11 21:59:38 -05:00
2a5921ecf1 Canvas::Rect::contains() should treat its right/left coordinates as exclusive 2015-02-11 21:59:38 -05:00
e8c24f1efd fix midi-capture filter
diskstream reads directly from port, Route
use prefilled buffer-set.
2015-02-12 01:05:16 +01:00
eddcd7128f infrastructure to allow tracing of all MIDI ports 2015-02-10 19:48:47 -05:00
34779ee81e add a sort-of hack to allow us to avoid drawing the first pixel of a waveview when necessary 2015-02-10 19:48:47 -05:00
6cad07fc11 fix boot message always sticking on the last loaded route; it looked like an error 2015-02-10 14:43:16 -06:00
c679d616f6 correct drawing of rectangle borders.
They need to use fractional coordinates, and the border position needed
generalizing for other border widths. See verbose comment for details
2015-02-09 16:41:28 -05:00
736038556f canvas items must be able to use fractional positions when rendering.
This is required to be able to draw precise single pixel lines, as described
in the Cairo FAQ
2015-02-09 16:40:10 -05:00
6dbc0c0919 put function into namespace 2015-02-09 14:46:20 -05:00
429da16b60 Fix sending out of bounds events to LV2 plugins. 2015-02-09 13:45:37 -05:00
nick_m
b1dafe9a31 Properly deallocate memory when clearing selection_op_history and
before XMLNode*s.
Improve some comments.
2015-02-07 23:33:09 +11:00
ae09d7132d fix 192k rate 2015-02-06 13:57:22 -06:00
63a1b56560 fix (and comment) on subtle bug with audio file data width function 2015-02-06 10:33:01 -05:00
nick_m
6b9415aedb Make undo/redo work for:
undo (n) where n > 1
redo (m) where m < n
new transaction.

Previously the redo list was left untouched.
This would lead to utter nonsense in the redo list.

AFAICT this never worked.
2015-02-06 21:54:27 +11:00
78e245d0b5 do not attempt to call an empty/null boost functor in clear_events() 2015-02-05 18:03:40 -05:00
c76523aeaa fix bad fix for cherry-pick conflict 2015-02-05 16:49:14 -05:00
e8b6f852f6 make two obvously const methods actually be const 2015-02-05 16:36:09 -05:00
e72a4ec850 modify behaviour of session when updating skips to use new SessionEvent API
Conflicts:
	libs/ardour/ardour/session.h
	libs/ardour/session.cc
2015-02-05 16:35:56 -05:00
ec9c6a58e2 add SessionEvent::Action to libs/ardour enums registration 2015-02-05 16:32:33 -05:00
6790f8342a expand SessionEvent API to allow ::clear_events() to work correctly.
clear_events() must run in realtime context, which is likely to be asynchronous
with respect to the thread that calls it. So allow caller to pass in a functor
that will be executed (also in realtime context) after the clear is done.

Additionally, allow for a cross-thread callback to the event loop/thread which
initiated/allocated the clear event request so that it can flush its own pending
loop. This part probably isn't necessary but doesn't hurt and is a useful model.
The event would be placed back in the free list at the next event allocation
by the calling thread anyway.
2015-02-05 16:32:21 -05:00
4010884a5b expand PBD::Pool API and add additional DEBUG_TRACE output.
Expanded API splits apart some CrossThreadPool functionality, and provides
access to current pool status information (available(), total(), used(), pending_size())
2015-02-05 16:32:10 -05:00
7152634104 set name of GUI event loop thread 2015-02-05 16:31:59 -05:00
nick_m
63935a86a4 Rework previous commit to avoid extra property lookup (fwiw). 2015-02-06 01:09:04 +11:00
nick_m
2d8b7c352b Make sure we have the property rather than the value of patch change id.
(don't crash whenever someone adds a patch change and reloads the session).
2015-02-06 00:53:12 +11:00
nick_m
ff13ac8b4f Clean up Session's _current_trans when aborting a drag. 2015-02-05 23:32:57 +11:00
b4a0136155 tweak to help with uncoalesced renders 2015-02-03 17:35:37 -06:00
9fab39358a render canvas using the GDK region rather than the GDK area.
The region is the un-coalesced set of rectangles that were requested for redraw. The area
is the coalesced single rectangle. In the worst cases, the coalesced rectangle could span
the entire window even though just two pixels in opposite corners were to be redrawn.

There is a problem with the verbose cursor as it is dragged across MIDI tracks. TO BE
FIXED.
2015-02-03 15:38:14 -05:00
2689848ed7 Add an extra test to prevent 'PBD::path_is_within()' from looping infinitely on Windows
The infinite loop would happen if the 2 supplied paths were on different Windows drives - for example if one was on drive C:\ and the other on drive E:\

I don't think this new test will be detrimental to the other platforms but if it is, we could easily separate it out with a '#ifdef PLATFORM_WINDOWS' directive.
2015-02-03 11:57:38 +00:00
e874bc0be1 If 'force' is TRUE (when using 'Location::set_start()' or 'Location::set_end()') make sure we do actually force the value to get set.
This gets us around a problem when converting a session from the old (Ardour2) format - where the Session Range (start) value was getting incorrectly set if we hadn't already set the end value.
2015-01-30 14:55:23 +00:00
0018ee2b02 fix “invalid use of incomplete type jack_client_t”
introduced in 66eef25
2015-01-30 11:02:07 +01:00
fe0254344f clarify sync-lock and disable it by default. 2015-01-30 10:43:56 +01:00
f15236b9a0 amend 070818f 2015-01-30 10:43:56 +01:00
bdfe32c086 stop transport when process_routes fails, even when using the parallel graph execution model 2015-01-29 22:00:05 -05:00
de8a8272bc fix incorrect return value from sndfile_data_width() 2015-01-29 21:59:55 -05:00
070818f884 take down backend specific threads with backend 2015-01-30 01:28:52 +01:00
66eef257d8 fix jack thread joining
at the time the graph gets around to takes down 
client threads, the jack-backend’s jack_client has been reset.
But never mind: libjack does not care about it, anyway.
2015-01-30 01:28:52 +01:00
55ba5208b9 return to old default disk chunk read size 2015-01-29 18:49:04 -05:00
def2147b4c fix -Wreorder in 6377fe89 2015-01-29 02:28:25 +01:00
c11a7a1bd7 allow bundling of lv2core
Don’t statically initiate the lv2 world, use explicit call after 
scanning bundles.


lilv_world_load_specifications() and lilv_world_load_plugin_classes()
are only ever called after lilv_world_load_all(), so we postpone
the call to it.
2015-01-29 02:13:33 +01:00
cf8e7bc135 ALSA-backend separate report for error and x-run 2015-01-28 13:47:24 +01:00
397ce4ccc7 ALSA-Backend prefer ppoll() 2015-01-28 13:47:24 +01:00
de85bfd857 fix #6117 - fader prelight 2015-01-28 02:22:52 +01:00
36bbd14113 towards fixing #5711
Don’t call ::output() [here: SilenceTrimmer::process()] 
with no data to process. 

If (position + N * period-size) % chunksize == 0;
frames_left == 0 before the last call to ::output().
chunker.h:60 keeps the ProcessContext<T>::EndOfInput
flag and the SilenceTrimmer will already have done ‘in_end’ processing.
2015-01-27 23:13:55 +01:00
Valeriy Kamyshniy
6377fe89a6 [Summary] Adding missing initialization of the date &time formats. “Init trashes” caused a bit ruined logic of the export dialog. 2015-01-27 17:06:54 -05:00
302dc2bea3 Don't try to dereference a NULL ptr (the function 'ARDOUR::IO::nth()' can return an invalid ptr, so let's make sure we test for it)
Note 1: Potentially we could have the same issue with 'AutomationLine::nth()' (although the current code seems okay)

Note 2: This (specific) problem seems mostly to affect Mixbus3 when it tries to load an old (version2) session from Ardour2. Mixbus can mark certain IO ports as being 'unused'. While loading sessions, function 'ARDOUR::IO::ensure_ports_locked()' deletes any unused ports. But later, the function 'ARDOUR::IO::make_connections_2X()' was crashing while trying to connect those (now NULL) ports. This commit fixes that crash but there's some evidence that it might only have moved the problem elsewhere. The version2 sessions now open successfully - but an MSVC (Debug) build now crashes whilst closing them (the Release build however, is okay). Someone who's more familiar with the code than me should review the Mixbus3/Ardour2 loading procedure to make sure it's safe.
2015-01-27 11:59:23 +00:00
cab01bac6c on OS X, do not require click to activate the application 2015-01-26 11:55:58 -05:00
bd3643a597 fix declaration of Cocoa NSApplicationDelegate methods 2015-01-25 12:52:26 -05:00
7c7f642a6f Revert "alter default disk chunk sizes"
This reverts commit 3068e55e51.
2015-01-25 11:42:35 -05:00
e6bb75cf01 audio-engine use internal API to stop
emit signal(s) when engine is stopped due to backend
change.
2015-01-25 10:19:06 +01:00
1fb83d698c make butler thread merely ask for session state save, not actually do the save itself.
This prevents the possibility of cross-thread calls in the GUI when it adds its state
to the session via extra XML
2015-01-24 19:27:28 -05:00
ab3ec791ea Add a new signal (not yet used) to initiate session saves; alter signal name for existing signal used to allow other objects to add XML state to session 2015-01-24 19:06:31 -05:00
3068e55e51 alter default disk chunk sizes 2015-01-24 19:05:05 -05:00
5ff6402dad add function to get data width for ARDOUR::SampleFormat 2015-01-24 18:53:10 -05:00
ccd881d518 ScrollGroup::covers_{window,canvas}() need to account for possible non-zero position of the group.
They also do NOT need to consider scroll offset
2015-01-24 18:48:28 -05:00
e84e1f7403 ScrollGroups are kept in their own list, so ::window_to_canvas() does not need to inspect root group children to find them
Conflicts:
	libs/canvas/canvas.cc
2015-01-24 18:48:15 -05:00
db28eefc49 ALSA backend: synchronous switch to/from freewheeling 2015-01-24 23:39:41 +01:00
f2ea059db3 DummyBackend: sync switch to freewheeling 2015-01-24 22:45:42 +01:00
3b2c23be93 split apart read and write chunk size and offer platform-dependent sizes for reading. Write chunk size should remain unchanged from before. 2015-01-23 12:25:49 -05:00
f282884094 apply Theme > “Show waveform clipping”
fixes http://tracker.ardour.org/view.php?id=5589#c15515
2015-01-21 19:35:04 +01:00
304b05ffd9 clarify reasonable synth description. 2015-01-20 21:25:59 +01:00
9c992fa97c few more basic ControList/Curve Tests 2015-01-20 00:46:58 +01:00
Guido Aulisi
c6e71a683e Curve::_get_vector: fix return value when veclen == 1
When the crossfade length is only 1 frame, I got strange
gain coefficients from get_vector (63 in my case).
The function wrongly returned the x axis value.
2015-01-19 23:55:52 +01:00
5190cbc9b2 2-point Curve Linear Interpolation Test 2015-01-19 23:55:52 +01:00
2a7389d8df minimalistic Evoral::Curve Unit Test. 2015-01-19 22:15:28 +01:00
b0a5245ef0 Hotfix crash in OSX engine dialog.
This is not really a fix, just some quick hack
to make ardour start at all if there’s no prior
CoreAudio EngineState in the config.
2015-01-19 17:50:50 +01:00
d2fa2450aa use C locale, because POSIX locale is not supported on windows, and operation is undefined. C works on all platforms 2015-01-19 07:29:25 -06:00
8900d7d9ea On Windows, #include <shellapi.h> so we can use ShellExecute() 2015-01-18 18:52:24 +00:00
a994dbaa0c fix open_uri for windows 2015-01-18 11:16:28 -06:00
d3227ac0d0 Dramatically improve windows session-save-time by avoiding recursive calls to set_locale. 2015-01-18 09:43:21 -06:00
219a09496f Fix MIDI bounce/consolidate note resolution. 2015-01-17 22:19:57 -05:00
d23eaea2ab Fix stuck notes in short MIDI regions. 2015-01-17 21:33:00 -05:00
20ea90a186 waf: fix concurrency issue with duplicate targets
The same source file cannot safely be used in different wscripts
with concurrency (if they were in the same wscript it works
.c.1.o .c.2.o, etc).


[387/764] c: libs/fst/vstwin.c -> build/libs/fst/vstwin.c.1.o
[731/764] c: libs/fst/vstwin.c -> build/libs/fst/vstwin.c.1.o
[746/764] cxxprogram: build/libs/fst/scanner.cc.1.o build/libs/fst/vstwin.c.1.o -> build/libs/fst/ardour-vst-scanner.exe
[750/764] cxxshlib: [...]  build/libs/fst/vstwin.c.1.o [...] -> build/libs/ardour/ardour-3.dll

and about one every full moon (depending on concurrency) it failed:
missing file: 'build/libs/fst/vstwin.c.1.o'
2015-01-17 18:19:25 +01:00
a58730e8f9 Revert "Kludgey fix for invisible playhead when scrolled."
This reverts commit 8f823388d9.
2015-01-16 22:06:10 -05:00
fc70b5a9f9 Compute arrow bbox manually to appease crazy canvas. 2015-01-16 22:04:26 -05:00
8f823388d9 Kludgey fix for invisible playhead when scrolled.
The problem this is avoiding makes absolutely no sense.  Either I'm dumb, or
something is more deeply wrong with scroll group bounding boxes, or both, but I
don't care anymore.  This works.  Viva release mode.
2015-01-16 21:04:38 -05:00
b759fd5879 Put playhead on top of everything.
Achieve this by adding a new hscroll group just for cursors.

That requires a slightly smarter window_to_canvas() to deal with overlapping
sensitive scroll groups.  New rule is that scroll groups can overlap, but the
most sensitive one found from the top down will be chosen to translate
coordinates.  This basically means don't overlap scroll groups with different
sensitivities.

In the presence of scroll groups, having a canvas-wide window_to_canvas()
and/or canvas_to_window() fundamentally makes no sense.  At some point in the
glorious future we should kill those and use only item-relative coordinate
translation.
2015-01-16 19:13:56 -05:00
d194ec9135 Update arrow bbox when geometry changes. 2015-01-16 19:13:56 -05:00
e48ff6b6a0 Fix clipping for scroll groups an offset bbox. 2015-01-16 19:13:56 -05:00
05a612b563 ASIO devices have a preferred buffersize.
pass this value up so it can be used by the engine dialog.
if for some reason the engine dialog still doesn't have a buffersize selected, print an error and try 512 instead of crashing.
2015-01-16 17:15:26 -06:00
7a0b0685c2 set failure message if new session folder cannot be created for any reason during save-as 2015-01-15 09:11:56 -05:00
4166b05bda Fix setting command key bindings on OSX. 2015-01-14 20:31:38 -05:00
140778641c get Session::save_as() working much more correctly, and cleaner 2015-01-14 17:53:23 -05:00
37f351ccdd JACK: add support for device names with whitespace
This is backwards compatible, quotes are only added if needed.
JACK1 < 0.123.1-30 and JACK2 < 1.9.10-25 fail with either
whitespace or quotes, so nothing is lost.
2015-01-14 19:29:55 +01:00
12d4375211 fix auditioning of regions with offset - fixes #6131 2015-01-13 18:36:10 +01:00
9863d160fc LTC: don’t flag “no lock” until delta was at zero at least least once. 2015-01-12 23:17:39 +01:00
b8bec75aa3 add an explicit indicator for LTC lock 2015-01-12 20:27:23 +01:00
08d56360d6 first working version of save-as 2015-01-12 12:57:05 -05:00
e90a784fb5 force complete peak compute.
Do not skip peaks when creating peak files while recording.
Fixes missing peaks in #6127

(TODO: after double-check and sign-off, remove ‘force’
parameter from ::compute_and_write_peaks API)
2015-01-12 18:19:05 +01:00
95091a52a0 When building with MSVC make sure any backends / panners etc get copied to the correct target folder
(i.e. 'lib/ardour3' or 'lib/mixbus3' as appropriate)

These changes are MSVC specific and shouldn't affect the other builds
2015-01-12 14:43:22 +00:00
55278fb3b0 Fix mouse event position offset bug.
Search scroll groups for event delivery from top to bottom rather than bottom
to top.  Overlapping scroll groups still aren't properly supported by the
canvas, but currently all we care about is that the top one gets the event, so
the hscroll group (tempo lines) can be below the hvscroll group (tracks), but
the latter gets events.
2015-01-12 01:05:01 -05:00
4d370b8942 add a midi->audio dummy backend mode.
this allows to easily debug latency compensation
as well as visualize lost midi events.
2015-01-11 20:51:57 +01:00
c3725d0a7b add initial code (and stubs) for save-as related functionality 2015-01-11 12:15:14 -05:00
38c2bdc856 gracefully handle missing .midnam
Fixes bug: Add a .midnam to local preferences.
use it in a session. delete the .midnam,
reload session -> crash
2015-01-10 19:31:50 +01:00
9e873acedb Accommodate a newly introduced #define ('LIBARDOUR') when building with MSVC
These changes are MSVC specific and shouldn't affect the other builds.
2015-01-10 12:15:47 +00:00
2abd8b8f06 Add a newly introduced header file to our MSVC project (libevoral)
This change is MSVC specific and shouldn't affect the other builds.
2015-01-10 11:58:58 +00:00
f598105966 Add support for the C99 function 'log2()' which is newly needed by 'gtk2_ardour/tempo_lines.cc' (but isn't available from MSVC).
These changes are MSVC specific and shouldn't affect the other builds.

(incidentally, libpbd already offers a function called 'fast_log2()'. Not sure if that could have been used instead...)
2015-01-10 11:56:24 +00:00
0367aa5825 remove cruft (old unused pre-git version files) 2015-01-09 06:11:57 +01:00
7f72e7d879 fix LTC alignment.
LTC-slave: offset the parsed LTC-frame instead of changing the
frame's timestamp. This fixes an issue with freewheel timeout and
delta-calculation. Align transport-time with output to match
capture alignment: "with existing material".

LTC-generator: follow suit. align clock with master-bus out.
This is a semi-permanent workaround. Once [tracks feeding] the
master-bus is/are delayed to align to output. The generator
needs to use (worst_track_latency not worst_playback_latency)
2015-01-09 06:08:15 +01:00
2132b917cc Fix offset events when consolidating MIDI range. 2015-01-08 23:28:02 -05:00
ec17b5388f Fix bounding box of rectangles with wide outlines. 2015-01-08 18:36:10 -05:00
659c0d093d remove hardcoded major version in build scripts 2015-01-08 17:59:41 +01:00
7985624037 Close polygon borders (fix partially drawn hits). 2015-01-08 11:09:38 -05:00
0fba29a67a tweak boot message so the final message makes more sense 2015-01-08 07:38:08 -06:00
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05:00
4d202d9157 Add modulus operator to MIDI transformer.
Useful for doing things like making alternating bowing patterns.
2015-01-06 23:04:28 -05:00
17dfebf611 Only restore plugin state (of first instance) once. 2015-01-06 20:29:39 +01:00
b56905b9a7 Fix MIDI file descriptor leaks.
Pretty sure this is the cause of MIDI data going missing on save for optimized
builds.  Introduced in 294b99aabf.
2015-01-05 15:50:30 -05:00
c16d520338 prepare for 'ardour4' 2015-01-05 19:07:24 +01:00
5584f46003 update windows user_cache_directory(): same pattern as config dir 2015-01-05 18:29:33 +01:00
6e3e1738dd removed hardcoded ".ardour" suffix 2015-01-05 17:48:42 +01:00
7f486e146d Accommodate some newly introduced source files for building with MSVC (libpbd) 2015-01-02 15:31:39 +00:00
d606a37204 Add PBD debug macros for recording timing data 2015-01-01 19:04:14 +07:00
1da30faf7f Add tests that show the timing differences between the Glib/mm based timeouts
This shows that PBD::Timer is pretty much identical in terms of timing and CPU
usage as Glib TimeoutSources.

They also show the differences on Windows when setting the minimum Multimedia Timer
resolution using timeBeginPeriod
2015-01-01 19:04:09 +07:00
b959b3fb87 Add PBD::Timer/StandardTimer/BlinkTimer classes for convenient timeouts 2015-01-01 18:59:01 +07:00
770c190ccf Add Timing, TimingData and Timed classes for time measurement to pbd/timing.h 2015-01-01 18:58:57 +07:00
2558e52e22 Fix alleged use of uninitialized variable.
Looks like a guaranteed else branch to me, but who am I to argue with gcc?
2014-12-31 17:32:21 -05:00
0274c93eac Add missing Variant => LV2 Atom case.
(Not likely to actually be used any time soon but fixes warning and does
something reasonable if lossy).
2014-12-31 17:16:28 -05:00
07c08e4673 fix incorrect test for valid MIDI events.
Only channel messages have the form <statusbyte>{<nonstatusbyte>..}
2014-12-31 10:32:50 -05:00
e4f61de52f Fix range "arithmetic"
Subtracting anything from an empty range should return an empty range, not an assert() failure
2014-12-31 07:43:43 -05:00
168d187994 Load what we can from broken/truncated MIDI files.
We're still a very long way from tolerant of weird SMF files (libsmf takes a
"crash if input is not exactly perfect" philosophy, if we're going to be polite
and elevate such a thing to "philosophy"), but at least we'll get what's there
from files truncated by old broken versions of Ardour or other situations.
2014-12-30 23:10:11 -05:00
f499f4cfd2 don't take temporary copy of MIDI sequence
fixes potential boost shared_ptr double free.
2014-12-31 03:19:00 +01:00
805d4dd731 add a MIDI loopback mode to the Dummy Backend 2014-12-30 22:55:14 +01:00
97d344f740 Fix MIDI CC record/playback crash. 2014-12-30 14:45:11 -05:00
c35e94a3c8 Fix some mangled whitespace (noop). 2014-12-30 14:41:22 -05:00
a85827da1c Revert "Fix occasional MIDI read crash."
This reverts commit ec947ff8fd.
2014-12-30 13:03:22 -05:00
54c085d931 Fix occasional crash when saving MIDI.
I can't figure out why a change has a NULL note; that shouldn't happen, but it
does.  Worse case scenario is some undo loss, so better to print something
informative and soldier on than crash.  Hopefully this will help track down the
real cause with more testing.
2014-12-29 22:01:41 -05:00
2e62ca9631 Fix off-by-one MIDI note names.
Much like everything else in midnam, it's not specified whether the numbers are
0 or 1 relative, but everything out there seems to be 0 relative and this
matches the canvas, so go with that.
2014-12-29 20:20:16 -05:00
a42b9ff86e fix a few compiler warnings 2014-12-29 18:17:26 -05:00
9b8760cf69 Avoid another potential deadlock for good measure.
Firing these signals while locked is not a good idea, Sequence/ControlList need
a better design for this that accounts for recording and lockedness.
2014-12-29 17:56:53 -05:00
cf6e9d3412 Blind fix for MIDI iteration bug. 2014-12-29 15:12:10 -05:00
190ac88248 Fix deadlock while recording MIDI controllers. 2014-12-29 11:34:18 -05:00
47d083d02d update numbering of midi-test sequences 2014-12-29 14:36:39 +01:00
95fcf18245 add a midi-CC sustain-pedal test sequence 2014-12-29 14:32:03 +01:00
6e38d3777e add 'size' field to midi-sequences 2014-12-29 14:09:46 +01:00
c3c6f619c3 make it easier to add new midi sequences 2014-12-29 13:58:15 +01:00
f4e89d75fd Add some newly introduced source files to our MSVC project (libardour) 2014-12-29 11:06:41 +00:00
541705e1ee Demote message about empty MIDI tracks to info. 2014-12-28 19:21:46 -05:00
4c0cebf7f9 MIDI transform dialog. 2014-12-28 16:06:44 -05:00
ec947ff8fd Fix occasional MIDI read crash.
Locking should prevent this from being a problem, but taking a reference to the
cached iterator and mutating it directly causes occasional crashes for me for
reasons I can't quite figure out.

This fixes the issue and is arguably more sane anyway, so whatever.
2014-12-28 16:06:44 -05:00
e735d4035f Clean up note delta command code.
Use Variant to store the value and the same code path for all properties.

Factor out getting the value of whatever property instead of special casing the
handling.

Towards using this stuff for some fancy things...
2014-12-28 16:06:44 -05:00
962be01ae8 Fix typo. 2014-12-28 16:06:44 -05:00
f3604814a4 use ldflags for wine linking
fixes issue with eg. wine-unstable:
--also-libdir=/usr/lib/i386-linux-gnu/wine-unstable/
2014-12-28 15:18:39 +01:00
4e2673ca2c add explicit chmod for good measure 2014-12-28 10:20:46 +01:00
28fb110dd3 fix [rare] concurrent build issue:
[709/779] subst: headless/hardev_common.sh.in -> build/headless/hardev_common_waf.sh
[710/779] hardev_common_waf.sh: -> build/headless/hardev_common_waf.sh
chmod: cannot access `headless/hardev_common_waf.sh': No such file or directory
2014-12-28 10:20:25 +01:00
e427724bd7 Some of libardour's istream and ostream operators are needed outside of libardour - so let's make them exportable
(currently, only the istream operators are needed but we might as well do them both)
2014-12-26 09:21:23 +00:00
6c50971eba Remove the source files which got transferred to libpbd 2014-12-26 09:18:23 +00:00
46d08595ff class 'PBD::Configuration' doesn't actually get exported from libpbd - so make sure we don't decorate it with LIBPBD_API 2014-12-26 09:16:58 +00:00
8eba7c5c0a Add some newly introduced source files to our MSVC project (libpbd) 2014-12-26 09:15:17 +00:00
7e25f21595 Conditionally remove possibly unused functions. 2014-12-25 20:07:57 -05:00
129cc4689a Remove warning when adding MIDI model controls.
This is fine, unlike the other cases, MidiTrack is not the only thing that can
have a MIDI automation control.
2014-12-24 20:41:14 -05:00
86242348ec Fix crash when getting width of item with no bbox. 2014-12-24 16:02:56 -05:00
b0f1c16e20 Support fancy controls for some AU units. 2014-12-24 13:00:32 -05:00
2e7cfe081f Add --no-lrdf configure option. 2014-12-24 13:00:32 -05:00
8c8bc51034 Fix OSX build. 2014-12-24 13:00:32 -05:00
0b471df0c3 fix clang compilation
error: call to function 'operator>>' that is neither
visible in the template definition nor found by argument-dependent lookup. 'operator>>' should be declared prior to the call site.

IOW. types.h must be included before using ‘ss >> (T) value’ in
template in pbd/configuration.h
2014-12-24 05:00:39 +01:00
bec521c6a7 proper default setup and fallbacks for video on windows 2014-12-24 01:36:46 +01:00
f5f89d8c7e fix for case-sensitive FS - aa80515f3 2014-12-23 23:43:25 +01:00
96ee33aa5f fix and cleanup c404ef98 (windows config dir) 2014-12-23 23:43:25 +01:00
Greg Zharun
aa80515f3f [Summary] Fixed audio export on Windows. Added support of windows platform for the function that calculated hardware concurrency.
Because there was no implementation for this function on windows it used to return 0. This meant that no thread was created to process the data.
2014-12-23 12:55:35 -05:00
6b6d78c41f indent cleanup 2014-12-23 12:35:58 -05:00
280910fd53 new file, derived from old libs/ardour/configuration.cc 2014-12-22 19:48:30 -05:00
d854c5d93c move ARDOUR::Configuration and ARDOUR::ConfigVariable into libpbd 2014-12-22 19:48:30 -05:00
c404ef9856 don't append .config to %LOCALAPPDATA%\<ProgramName>\
::user_config_directory() could use some general cleanup
an x-platform consolidation, but today is not the day.
2014-12-22 23:04:44 +01:00
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
795c5c16f1 no use of GUI parameters in libardour 2014-12-22 13:39:46 -05:00
76d42ab644 change SessionEvent::Immediate to -1, and ensure that clear_events() uses it rather than a hard-coded value
This fixes a design error of using zero as the flag for an "Immediate" event's action frame. Zero
is a perfectly legitimate action frame for an event (e.g. a Skip event), and using zero was causing
skip events with action-frame == 0 to be treated as immediate, not scheduled.
2014-12-21 11:45:53 -05:00
dafcaec023 Limit Wiimote surface discovery to 5 connection attempts
If you don't connect a Wiimote then the connection attempts were
endless.
2014-12-21 12:53:00 +07:00
282c563fce fix newly introduced deadlock when cloning MIDI regions 2014-12-20 14:09:39 -05:00
David Robillard
5d8021bf44 Maintain correct tracker state on MIDI overwrite.
This is a little hard-edged in that edits while rolling will prematurely chop
off any playing notes, but at least the state of things actually reflects
reality.  More sophisticated solution hopefully to come...
2014-12-20 01:13:25 -05:00
db92d62c95 Revert "Change default for region selection after split on Mixbus"
This shouldn't be necessary: Mixbus should probably just have a different
value for the default in their source tree instead.

This (partially) reverts commit 631467f0bb:
I now realise that I accidentally rolled another fix (missing "region-" in
config variable name) in there too: sorry about that.
2014-12-19 21:16:02 +00:00
631467f0bb Change default for region selection after split on Mixbus
Mixbus prefers that both the newly-created regions as well as the existing
selection are selected after splitting selected regions: make this the
default on Mixbus.
2014-12-19 17:12:05 +00:00
d4a3141927 Add a config option to control region selection after split.
Add a configuration variable to choose the behaviour of the region
selection after splitting selected regions.

Add options to choose between all eight possible combinations of 'existing
unmodified selected regions', 'newly-created regions to left of split',
and 'newly-created regions to right of split', but comment out all but the
three least crazy ones for now. If anyone wants them, they're there.
2014-12-19 17:12:04 +00:00
a494211e73 add ArdourCanvas::change_alpha()
Time to move away from rgba macros
2014-12-19 09:53:26 -05:00
Valeriy Kamyshniy
1b89055526 [Summary] Bug fix: mistakenly set states of freewheeling thread. 2014-12-18 17:07:37 -05:00
74be550698 change Item::visible() to Item::self_visible(); add Item::visible() which returns accurate visibility
Child items will be hidden when their ancestors are hidden. The old ::visible() implementation didn't reflect this. In addition,
when changes are made to hidden items (new definition of visible/not visible), don't bother to request redraws, since this will
be done when the item becomes visible again.
2014-12-18 10:30:38 -05:00
7eab4c6f33 Don't assume compiler can avoid copy to const ref. 2014-12-18 04:03:39 -05:00
e584ae0bf9 Mute automation via normal mute button. 2014-12-18 02:26:51 -05:00
64490e88e4 No need to yell. 2014-12-18 02:26:34 -05:00
0f759e9a93 MIDI bounce. 2014-12-17 21:48:09 -05:00
d2cafbe95a Remove some aborts that don't really need to be.
Enforce PatchPrimaryKey sanity at the type level rather than attempting to
check for it everywhere.

Remove dead file.
2014-12-17 19:43:09 -05:00
a706755710 Fix various MIDI locking issues.
Attempt to make mistakes much less likely in the future by statically requiring
caller to pass scoped locks where necessary.
2014-12-17 16:07:29 -05:00
ec6626f06a Fix oops in previous commit.
Professionalism is overrated.
2014-12-17 02:10:01 -05:00
0c3f4bd995 Fix occasional crash when recording MIDI. 2014-12-17 01:49:46 -05:00
12803c4255 use new parameter to limit minimum length of any range location 2014-12-16 13:06:13 -05:00
94e2b61a86 add new parameter for minimum value of any range location 2014-12-16 13:06:05 -05:00
0fdb846625 try alternate Glib:: API for conversion from UTF-8 to ascii in Mackie support code 2014-12-15 15:06:10 -05:00
e3f376107e nominal fix for sending UTF-8 text to Mackie surface 2014-12-15 14:44:05 -05:00
9831006c8e add getters for SVAModifier 2014-12-15 12:06:53 -05:00
995bcd3aa0 fix typo 2014-12-15 09:29:04 -05:00
aa57e9e032 more fixes to SVAModifier constructor(s) 2014-12-15 09:03:52 -05:00
9a454ab3d4 Add a newly introduced header file to our MSVC project (libpbd) 2014-12-15 10:26:06 +00:00
3fa4063d9b fix up SVAModifier constructors 2014-12-14 23:41:31 -05:00
427b93055f add SVAModifier to ArdourCanvas color code 2014-12-14 23:34:36 -05:00
0fa5643d20 move ScopedFileDescriptor into libpbd and use it 2014-12-14 12:26:00 -05:00
1b3fb142f0 Only attempt to close our peakfile '_fd' if we have a valid handle
(yesterday's fix was needed in a 2nd place)
2014-12-14 10:39:29 +00:00
90010d098f Only attempt to close '_peakfile_fd' if we have a valid handle 2014-12-13 12:46:24 +00:00
ee38c44109 Structure MIDI device selector by manufacturer.
Unfortunately we store the state of models as simply model, so if there's ever
duplicate model names, we're somewhat screwed, but this makes the (previously
unmanageably huge) menu usable, while retaining the "model name as global
identifier" state unmodified.
2014-12-13 00:37:34 -05:00
ec0a74276a Remove (no longer needed) sources from our MSVC project (libpbd) 2014-12-12 09:08:16 +00:00
050d46a33e Merge branch 'nofilemanager' 2014-12-10 18:29:41 -05:00
a4273ee224 Revert "fix some cast warnings"
This reverts commit 17707b9674.
2014-12-10 18:29:00 -05:00
294b99aabf remove file manager LRU cache from code.
This was a very clever attempt to fix a non-problem. If the platform doesn't have enough file descriptors available
then the platform is broken and we're not going to hack around trying to fix it.
2014-12-10 18:28:55 -05:00
a25d945c3e fix some cast warnings 2014-12-10 18:27:11 -05:00
17707b9674 fix some cast warnings 2014-12-10 18:13:12 -05:00
3e27a71c71 simpler approach for Apple setrlimit() compatibility issue 2014-12-10 15:59:11 -05:00
b91c7836de try some alternate, hard numbers when resetting open file limits on OS X 2014-12-10 15:27:32 -05:00
a0fcf2fc66 remove ugly and unnecessary debugging output 2014-12-10 13:37:03 -05:00
2f300085ea Use DEBUG_THREAD_SELF when using DEBUG_TRACE with pthread IDs
(supports both normal pthreads usage and PTW32)
2014-12-10 16:56:33 +00:00
635578b30b use correct conditional to choose between different DEBUG_THREAD_SELF macros 2014-12-10 11:07:18 -05:00
c06c15596b add DEBUG_THREAD_SELF to allow use of DEBUG_TRACE with thread IDs on both normal pthreads platforms and PTW32 2014-12-10 09:34:32 -05:00
e66752cec1 add set-session-extents-from-edit-range 2014-12-09 16:18:47 -06:00
1e0c1751a5 more DEBUG::Butler output, formatting corrections, and a warning on cerr if capture/playback buffers are too full/empty 2014-12-09 16:36:52 -05:00
724febc82c remove superfluous PBD/ARDOUR:: init calls
this reverts 339670b
2014-12-09 19:41:53 +01:00
8e44a0bff7 add DEBUG::Butler and use it 2014-12-09 10:18:29 -05:00
246a4f3018 correct install location for .mo files (i18n) and cleanup LOCALEDIR use a bit 2014-12-09 08:19:11 -05:00
624a86c39d lots more color work, closer and closer to being ready for ... being taken apart again 2014-12-08 22:02:38 -05:00
9ac7ddb31d remove all explicit button text colors; use contrasting_text_color() instead.
Also, use a slightly off-white rather than pure white, which should really be configurable
2014-12-07 13:55:40 -05:00
a81a79adce Add some newly introduced source files to our MSVC project (libardour) 2014-12-07 13:31:41 +00:00
bfbb0f6178 Add legatize and remove overlap MIDI operations.
We're going to need the ability to apply MIDI edit operations to a note/control
selection soon...
2014-12-06 23:42:11 -05:00
e1e2b919c3 Remove unnecessary includes. 2014-12-06 22:43:06 -05:00
eb86971d2d Invalidate iterator whenever model changes.
I suspect this is an underlying cause of several tricky to reproduce bugs, but
we'll have to wait around and see...
2014-12-06 22:43:06 -05:00
6f7ee67c71 midnam test: don't clutter up output. 2014-12-06 23:51:45 +01:00
60f4f5b9d8 Fix inappropriately massive flag font. 2014-12-06 16:07:32 -05:00
f9c74319a2 Fix seek in linearly interpolated control lists. 2014-12-06 15:44:10 -05:00
4650912ae3 Adapt range when copying between automation types.
For things like copying from pitch bender to a CC.

Also things like fader to pan, but that seems a bit funny.  The conversion
probably needs to be a bit smarter here, perhaps taking the normal into
consideration...
2014-12-06 13:40:35 -05:00
82be2325d9 Fix uninitialized members. 2014-12-06 12:06:48 -05:00
ddb7cc6d66 More potential SMF crash fixes. 2014-12-06 11:19:48 -05:00
2e92ae90a6 Possible half-fix for SMF crash. 2014-12-06 10:37:08 -05:00
9266e7524a experimental drawing optimization.
Q: is bounding_box(); etc more complex than queuing draw?

either way, canvas should eventually switch to
use an optimized OptimizingLookupTable.
2014-12-05 22:40:26 +01:00
587dc283ea Fix stuck faders on very fine adjustments.
I attempted to preserve the "don't draw unless different" by ditching rounding for more
precise display_span, but that didn't work.  An alternative solution would be
to draw on adjustment change if there's text, since then we need to redraw
regardless of slider position, but it seemed weird even just with respect to
the slider, so I opted for this, which really definitely redraws when the
adjustment changes, period.

If this proves to be a performance issue we'll have to figure that out.
2014-12-05 15:19:43 -05:00
fb406e5b36 fix small memory leak in the tests 2014-12-05 20:57:07 +01:00
8714fab1bc update to 'new' ControlList API
add (double when, double value, bool with_guards=true, bool with_default=true);
2014-12-05 20:57:07 +01:00
91d3e8ead0 if a Route's processor lock cannot be taken, fill buffers with silence (causing click) rather than abort() 2014-12-05 14:49:30 -05:00
cf3faf1b42 fix "expected" <> "actual" semantics in test-util 2014-12-05 18:32:16 +01:00
207fd04587 include alpha-delta computation in HSV::delta() 2014-12-05 09:01:55 -05:00
17ad6a5078 Add 'pbd/crossthread.cc' to the MSVC build 2014-12-05 08:40:47 +00:00
0bf778c847 Make recorded MIDI controls discrete, take 2.
Hopefully-desired behaviour is that controls created in the GUI are linear, so
clicking in stuff works like other automation, but controls that originated
from recording are set to discrete so Ardour plays back the input exactly,
instead of doing crazy things like linear interpolation of already high-rate
user input, hold pedals, and so on.

Hopefully that remains the desired behaviour, because we're basically screwed
for ever making any control discrete by default, since we only save the mode to
XML at all if it's not the default, which is currently linear.
2014-12-05 00:15:40 -05:00
ad340333f4 Revert "Create discrete lists for recorded MIDI controls."
This broke saving/restoring interpolation style.

This reverts commit 07a381a8f5.
2014-12-05 00:03:47 -05:00
124e54f01b Fix crash when twiddling MIDI controllers (#6050). 2014-12-04 22:23:16 -05:00
59af923b77 Fix steps for log controls with wide range. 2014-12-04 21:22:31 -05:00
55c4889c9a fix windows compilation 2014-12-04 17:13:43 +01:00
b996f07122 add required header 2014-12-04 11:05:33 -05:00
697c397f37 move WSAStartup() and WSACleanup() out of per-object methods into per-library init/cleanup methods 2014-12-04 10:07:11 -05:00
4e8dfda880 clean up whitespace 2014-12-04 09:11:46 -05:00
5f9e81b105 Include pbd/crossthread.cc in the mingw build 2014-12-04 16:16:06 +07:00
12acce0d0e Use correct name for windows.h 2014-12-04 16:15:07 +07:00
24727e65be Make gain controls step by roughly 1.0/0.1 dB.
Shoot for roughly 30 steps for all controls.

Always keep sensible step information in ParameterDescriptor and just convert
for the UI.

This is a little weird, but it's less weird than it was before, and works.
2014-12-04 00:30:47 -05:00
9b770c7aff actual expected test results:
We should not add an initial implicit value
at time ‘0’ to automations.
2014-12-04 03:55:03 +01:00
b437de714f make all tests pass 2014-12-04 03:53:26 +01:00
fb63b3ffc3 fix to follow changes to evoral/libardour split 2014-12-03 21:22:53 -05:00
602e390649 changes to Mackie Control support for new crossthreadchannel implementation 2014-12-03 21:22:34 -05:00
2f0c998210 adapt changes to async MIDI port to use new evoral/libardour split 2014-12-03 21:11:24 -05:00
7ab3da66b5 fix up BaseUI to use crossthreadchannel on all platforms 2014-12-03 21:11:02 -05:00
d3e2de8b4e modify Mackie surface code to use crossthreadchannel on all platforms 2014-12-03 20:57:58 -05:00
f4726cc6fa modify MidiUI code to use crossthreadchannel on all platforms 2014-12-03 20:55:44 -05:00
d762ed8c22 alter Async MIDI port implementation to use crossthreadchannel on all platforms 2014-12-03 20:53:49 -05:00
f72b87b448 new platform specific crossthreadchannel files 2014-12-03 20:47:59 -05:00
5c51b302ce manually merge new CrossThreadChannel implementation for windows from Tracks 2014-12-03 20:47:27 -05:00
888bf2d551 Test: update AutomationList properties for v3.5 2014-12-03 23:37:27 +01:00
40087eb378 Test: print assert message if XML property mismatch 2014-12-03 23:27:14 +01:00
b52d8e5151 fix audioengine use in unit-tests. 2014-12-03 20:47:29 +01:00
89d48f4459 fix MTDM test 2014-12-03 20:45:27 +01:00
339670b6fa Tests: ensure that libardour is initialized 2014-12-03 20:45:01 +01:00
32269f0c5a fix audio-engine dtor.
backends - once instantiated - keep a reference to the engine.
when audioengine is destroyed, the backends must be deinstantiated.
This fixes various unit-test cases.
2014-12-03 20:44:47 +01:00
9268d2e699 allow to auto-start dummy backend (needed for tests) 2014-12-03 18:24:56 +01:00
d45e19eda5 fix test segfault
whe XMLTree goes out of scope, the root-node is deleted
2014-12-03 16:03:57 +01:00
0d677f70b4 use Dummy backend for tests 2014-12-03 16:03:19 +01:00
0ec85a4164 Fix running libpbd unit tests when $TOP(in test scripts) is set as relative path
Add test for PBD::canonical_path that was used to track down silly mistake
in test code
2014-12-03 17:44:48 +07:00
dd976d8c7a Add DEBUG_TRACE output to PBD::canonical_path 2014-12-03 17:31:05 +07:00
81d47f5b8c Call PBD::init() from libmidi++ test runner
This is mostly just to be able to set PBD_DEBUG for testing if
necessary
2014-12-03 17:31:05 +07:00
d360bc3906 Add ability to set libpbd debug options via PBD_DEBUG environment var 2014-12-03 17:31:05 +07:00
9eb8b73b43 Call PBD::init from evoral testrunner
This is needed to set _fmode = O_BINARY for libsmf/fread and
fixes takeFiveTest on windows
2014-12-03 17:31:05 +07:00
4b751f9e87 Move setting _fmode flag on windows into PBD::init
This moves setting of _fmode slightly later in the initialization
of the application via Ardour::init.
2014-12-03 17:31:05 +07:00
dc4d76b1d4 Remove references in pbd test script to libs no longer in source tree 2014-12-03 17:31:04 +07:00
01a17f296f Make pbd test script consistant with other test scripts
remove running script from pwd limitation
2014-12-03 17:31:04 +07:00
4fe6bf3530 export MIDIPP_TEST_PATH in midi++ test script so test files can be located
Modify formatting of script to be consistant with other test scripts
2014-12-03 17:31:04 +07:00
23c0452e05 Add test_search_path to find test files in MidnamTest 2014-12-03 17:31:04 +07:00
aed58d6f39 Use test_output_directory() in pbd filesystem test
This prevents directory being created in pwd and means deletion of
directory is unnecessary
2014-12-03 17:31:04 +07:00
61f9ca9f3c Use test utility function to find evoral test files
either via EVORAL_TEST_PATH env var or on windows via directory relative
to dll
2014-12-03 17:31:04 +07:00
f6e15a3b6b Use PBD::tmp_writable_directory to write evoral test file into
no need to remove directory as it is temporary
2014-12-03 17:31:04 +07:00
929fc3d235 Use PBD::tmp_writable_directory in libardour test_util.cc 2014-12-03 17:31:04 +07:00
376340a29f Remove unnecessary comma in pbd wscript file 2014-12-03 17:31:04 +07:00
1c1eff8845 Use PBD::tmp_writable_directory in test_output_directory 2014-12-03 17:31:04 +07:00
1abe8f4e42 Add PBD::tmp_writable_directory utility function to pbd/file_utils.h/cc 2014-12-03 17:31:04 +07:00
2b03521ef9 Fixes for AudioEngine test 2014-12-03 17:31:04 +07:00
e83bb2f4e2 Remove unused test_common.h/cc files 2014-12-03 17:31:04 +07:00
f1b66b86b4 Move libardour test utility code into one source file 2014-12-03 17:31:04 +07:00
b9567b6d46 Use ardev_common.sh to setup environment for running libardour tests 2014-12-03 17:31:03 +07:00
7a3c54f031 Fix evoral test suite. 2014-12-02 23:30:16 -05:00
25efe5953c Fix range of pan controls.
Set default range to [0,1] since [0,0] is problematic and useless anyway.
2014-12-02 19:02:03 -05:00
94b26cd9af Make 'ARDOUR::ParameterDescriptor' exportable, so that it can get used outside of libardour 2014-12-02 18:59:43 +00:00
a13ff7b604 Remove accidentally committed file. 2014-12-02 12:15:54 -05:00
7aab4be5e4 alsa-backend: drop midi during freewheel processing. 2014-12-02 17:03:29 +01:00
db3d42d551 first pass at optimization for low-level canvas code 2014-12-02 05:32:34 -05:00
cf47d71761 Fix lost MIDI events due to broken range check. 2014-12-02 03:36:33 -05:00
07a381a8f5 Create discrete lists for recorded MIDI controls. 2014-12-02 00:21:52 -05:00
86de0386c9 Fix automation write/touch. 2014-12-01 23:35:24 -05:00
2b69fa6edf Factor out copy-paste code. 2014-12-01 23:35:24 -05:00
767c0238a3 Replace half-baked param metadata with descriptor.
Among other things, this means that automation controls/lists have the actual
min/max/normal/toggled of parameters, and not those inferred from the Parameter
ID, which is not correct for things like plugin parameters.

Pushing things down to the Evoral::ParmeterDescriptor may be useful in the
future to have lists do smarter things based on parameter range, but currently
I have just pushed down the above-mentioned currently used attributes.
2014-12-01 23:35:24 -05:00
Julien de Kozak
cb8abbe8d2 Make it compile with C++11 support.
Reference : https://bugs.webkit.org/show_bug.cgi?id=59249
2014-12-01 23:18:11 +01:00
43cc295a58 Tidy up comments in Evoral::coverage
Remove old (already #if 0'ed) implementation of Evoral::coverage() and its
comments.

Tidy up the comment enumerating all the possible ways in which two ranges
can overlap, note the Evoral::OverlapType corresponding to each one, and add
comments to the if()s in coverage corresponding to the cases in the list of
overlap types.

Remove some commented-out assert()s that actually do happen, and re-instate
one that really shouldn't.

Fix a small typo (with -> within)
2014-12-01 20:13:04 +00:00
dd5fc9432f Simplify Evoral::RangeList::subtract(), and make it pass amended tests
The various conditionals in Evoral::RangeList::subtract() appear to have
been there to work around
 (a) coverage() not always returning the correct value, &
 (b) the test suite assuming that the ->to point lies outside the range

Now that these are both fixed, the implementation of subtract() becomes
quite a bit clearer. I replaced the if()s with assert()s for now, but these
shouldn't trip if coverage() is working as I expect.

Also (attempt to) clarify the comments in subtract.
2014-12-01 20:13:04 +00:00
30a9c2d05b Comments in various call-sites of coverage()
Comments in various call sites of Evoral::coverage() marking things I think
are dubious (with XXX). Also straightened up the alignment of some ASCII
art in libs/ardour/diskstream.cc
2014-12-01 20:12:51 +00:00
d7cc7775f3 Rework Evoral::coverage() to pass unit tests
Rewrite Evoral::coverage() to (hopefully) do what it's supposed to.

Return OverlapNone for invalid ranges: if either of the ranges passed to
Evoral::coverage() have negative length (i.e.  start > end), return OverlapNone
- it seems reasonable to say that a negative-length range can't overlap
anything. Also return OverlapNone from the fallthrough case, though this should
never happen.
2014-12-01 20:03:22 +00:00
47d329ca40 Make tests of Evoral::Range functions include both endpoints in Range
Some of the tests for Evoral::RangeList::subtract() assume that ranges
don't contain their end (->to) point. This appears inconsistent with how
they are used elsewhere.

Add some ASCII art comments to the tests to try to clarify what they're
really testing for, and amend subtractTest1, subtractTest4, & subtractTest5
to incorporate the assumption that ranges include their end points.
2014-12-01 16:52:58 +00:00
0c7dd82239 exclude fader-reserve from range 2014-12-01 17:45:27 +01:00
0ffeaa6d6a Remove braindead Parameter inheritance abuse. 2014-11-30 23:56:20 -05:00
7eb4e5d22b Replace thinning static state with parameter. 2014-11-30 23:56:20 -05:00
b68fd1cc25 Remove dead code. 2014-11-30 23:56:20 -05:00
0b48eb68f8 Remove bogus test and noisy output. 2014-11-30 23:56:19 -05:00
2588b1cac9 Trim the include tree. 2014-11-30 23:56:19 -05:00
1693e57e0e Move EventRingBuffer to libardour.
This is not used anywhere in Evoral and is just a wrapper around the PBD
RingBuffer anyway.  Towards a (once again?) independently buildable/testable
Evoral and fewer cross-dependencies.
2014-11-30 23:56:19 -05:00
cf537b97f5 Add missing namespace qualifiers. 2014-11-30 23:56:19 -05:00
008bfceb77 Clean up state tracking of raw MIDI. 2014-11-30 23:56:19 -05:00
a0deb7c3bf Save mute automation state. 2014-11-30 23:56:19 -05:00
272c93db12 CLA approved consistent fine-grained scale modifier 2014-11-30 21:27:31 +01:00
2996e677c4 Process 'default_ui_config.in' when building with MSVC 2014-11-30 17:57:44 +00:00
18efe8f446 consistent step+page sizes for fader+spinbox 2014-11-30 15:05:40 +01:00
fb3f9033cf use update_steps() instead of custom function 2014-11-30 15:05:39 +01:00
0622fc9d4b update_steps(), properly handle integer ranges 2014-11-30 15:05:39 +01:00
bd85c8ec43 fix ladpsa default value.
because get_parameter_descriptor() is const, also wrap
default_value() in a const function.
2014-11-30 15:05:39 +01:00
cf859270e0 fix LV2 default port value. 2014-11-30 15:05:39 +01:00
77d5fb7a35 Fix write for boolean automation. 2014-11-29 14:32:12 -05:00
c77f4b7a18 don't move faders on click.
for one, it can mess up the value when switching to
numeric-entry. It is also rather useless and not
Fader-like (faders are not scrollbars).
Besides, "stepvalue" is way to large and causes jumps
(sometimes step-value is even negative, see
"fast lookahead limiter", "release time"
 -> some other bug)
2014-11-29 17:31:41 +01:00
58663db374 change ownership of processor window-proxy
fixes crashes:
* If the Editor-Mixer shows a channel with a plugin that
has been edited in the Mixer, double-clicking the plugin 
will try to bring up a 2nd instance of the plugin-UI.
* When closing Ardour both the Mixer and the Editor-Mixer try to delete the underlying plugin, resulting in a double free.
2014-11-29 10:06:25 +01:00
784b96e255 Set discrete by default for boolean parameters. 2014-11-29 01:40:23 -05:00
ed1bbefd19 Somewhat working gain automation.
This probably isn't correct in several ways, but it works more than it did, so
I figure it's push worthy.

Still not working:

 * Saving mute automation list
 * Dragged control points are not snapped to model restrictions
   (boolean, in this case, but general problem)
 * Line goes funny if you record mute automation
   (as opposed to drawing it which works)
2014-11-29 01:25:27 -05:00
f190e630ab Show discrete/toggled automation as stepped line. 2014-11-28 21:15:28 -05:00
e55b68298b Fix crash when deleting all points from a line. 2014-11-28 20:04:57 -05:00
358ebde106 Set the toggled default metadata of parameters.
This is so generic code looking at the Parameter for gain, solo, and
rec-enable will get the correct value for toggled.
2014-11-28 18:04:51 -05:00
ea35595370 Add some newly introduced source files to our MSVC project (cairocanvas) 2014-11-28 14:42:17 +00:00
16947f751b Remove dead code. 2014-11-27 04:17:15 -05:00
3d4b1d324e Fix calculation using uninitialized value.
Implicit "this" is the devil.
2014-11-27 04:15:30 -05:00
25e1eddc50 remove "port sources" management from MidiControlUI and Mackie support.
This was necessary due to a bug/design issue between Glibmm and Glib (see https://bugzilla.gnome.org/show_bug.cgi?id=561885)
 but the problem needs to be managed by the *creator* of the IOSource and that has now moved inside CrossThreadChannel.
2014-11-26 18:22:22 +02:00
6edd81e4f6 get correct ::distance() and ::delta() implementations for cases involving achromatics 2014-11-26 18:22:22 +02:00
318a9edab9 massive reworking of color selection implementation 2014-11-26 18:22:22 +02:00
c927eeb9ee ensure that Ardour recognizes its own MMC device ID as "all-call" when set to 0x7f (127) 2014-11-26 18:22:22 +02:00
b9be8d2652 Replace individual waf options for enabling backends with one --with-backends option 2014-11-26 22:47:05 +07:00
4358b8db79 Add test for Evoral::coverage()
Add a test function to test Evoral::coverage() with all possible overlap
types. The first test (line 161) that expects OverlapExternal will fail
with the current implementation of coverage().

There's possibly still a discussion to be had about what the overlap type of
ranges with negative lengths should be: there are currently places in the main
Ardour code base where coverage() is called with ranges where start > end.
2014-11-25 17:49:51 +00:00
3a6c9e3bb9 Fix build of evoral tests
Fix compile errors in libs/evoral/test/, by explicitly calling
Evoral::MusicalTime::to_double() wherever a double value is required of a
MusicalTime.

Some of the double variables should probably really be made into MusicalTime
ones instead, but I don't want to mess with this too much.

takeFiveTest still fails for me after this, but a failing test is probably
more informative in the long run than a test that won't even compile.
2014-11-25 14:59:48 +00:00
1f58f81aa6 Fix order of parameters to stop_touch() in Mackie::Control
Reverse the parameters of Mackie::Control::stop_touch() to make them
consistent with AutomationControl::stop_touch(), and fix up the call to
AutomationControl::stop_touch() to have the parameters in the correct
order.

Unfortunately, I don't possess any devices that speak the Mackie protocol, so
though the patch seems logical and correct to me, I have no way of testing it.
If anyone has a device with touch faders that speaks Mackie, I'd be glad of any
confirmation that it at least doesn't break anything.
2014-11-25 14:59:48 +00:00
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
78218e8c07 fix OSX open URL in browser 2014-11-24 20:35:38 +01:00
c7ddedc5b8 Simulate 'trunc()' which isn't available in MSVC
(needed by 'gtk2_ardour/editor.cc')
2014-11-24 12:56:07 +00:00
018f559aad Remove a commented out line in 'pbd/stacktrace.h'
(was probably just needed for testing at some stage)
2014-11-24 12:53:24 +00:00
25745758aa Changes needed to accommodate building libevoral with MSVC
Note that class 'MusicalTime' needn't be exportable (with a little work, this could be reverted if it affects the other builds)
2014-11-24 12:51:54 +00:00
c0e8647806 amend c4533939b9 2014-11-24 00:04:45 +01:00