13
0
Commit Graph

24480 Commits

Author SHA1 Message Date
0aea5288cd Use XMLNode::get/set_property API in PBD::Controllable 2017-04-19 09:36:48 +10:00
800fdd0f0f Add pbd/types_convert.h header for PBD::to_string/string_to specialisations 2017-04-19 09:36:48 +10:00
ae27e33f29 Add a template based get/set_property API to PBD::XMLNode 2017-04-19 09:36:48 +10:00
8f516a2c4f Remove now unused stream operator functions in ardour/types.h 2017-04-19 09:36:47 +10:00
2b58bbd50a Use PBD string conversion functions in PBD::ConfigurationVariable
No longer need a specialization for bool as PBD::to_string/string_to already
has specializations for bool

Remove template specialization for float as string_to/to_string handles string
representations of infinity
2017-04-19 09:36:47 +10:00
cb3c564822 Use int32_t type instead of long for font-scale UI configuration variable
long type can not be used with PBD::to_string/string_to
2017-04-19 09:36:47 +10:00
63296285be Add missing header include to ControlProtocol class source file 2017-04-19 09:36:47 +10:00
3edb6b2e1f Use PBD string conversion functions in PBD::Property class 2017-04-19 09:36:47 +10:00
7c4c58ba34 Add header for PBD::to_string/_to template specializations for Evoral types 2017-04-19 09:36:47 +10:00
911e2af018 Add header for PBD::to_string/string_to() specialisations for libardour types
Add PBD::to_/string_to specializations for ARDOUR::DataType

These could go into the data_type.h header but they don't really need to and it
means that ardour/types_convert.h can just be included by source files that
need to do type<=>string conversion. A potential problem with this is that if
all the specializations are contained in a single header then any class that
requires inclusion of that header to do serialization will be recompiled each
time types_convert.h is changed. I'm not going to worry about it at this stage,
it can always be broken up or improved upon later.
2017-04-19 09:36:42 +10:00
95b4fd64dd Add DEFINE_ENUM_CONVERT macro for defining PBD::string_to/to_string for enums
A simple macro for defining the four template specializations required to
convert an enum to a string and back using the existing string_2_enum and
enum_2_string functions. Generally these will only be instantiated in one
source file, I don't think it is necessary to explicitly instantiate any at
this stage.
2017-04-19 07:49:58 +10:00
f4f4c01f4c Remove now unused ID::print method 2017-04-19 07:49:58 +10:00
fda05ac64b Use ID::to_s() in gtk2_ardour instead of ID::print() 2017-04-19 07:49:58 +10:00
334ec95e43 Use ID::to_s() in libardour instead of ID::print() 2017-04-19 07:49:58 +10:00
4dd0203f01 Use ID::to_s() in libpbd instead of ID::print() 2017-04-19 07:49:58 +10:00
454b2d4e69 Use PBD string conversion functions in PBD::ID instead of snprintf
Keep ID::print in place for now and replace usage in subsequent commit to
minimize changes
2017-04-19 07:49:58 +10:00
e31f242836 Add missing <iostream> header include
This will be required for subsequent commits that remove inclusion of
<iostream> from some shared headers.
2017-04-19 07:49:58 +10:00
13bfd1527a Make boolean string values 0 and 1 to maintain backwards compatibility
I would prefer "yes" and "no" as it distinguishes boolean values from numeric
but using "yes and "no" results in PBD::Property<T>::from_string failing to
parse the correct values when opening in an older Ardour version as there is no
specialization for bool.

Using 0 and 1 also results in less change to the Session file.
2017-04-19 07:49:57 +10:00
362303f793 FP8: Fix sort-order 2017-04-18 16:09:44 +02:00
a372fcbe51 prevent crash when loading midi port info about ports that no longer exist 2017-04-18 14:22:51 +01:00
5dce10500c FP8: handle backend changes + reconnect
When the backend is dropped or changed, on engine-restart
the connection_handler() re-establishes already connected ports.
There's no disconnect when the backend dies or is hard-stopped.
2017-04-18 15:14:00 +02:00
3243e17c71 FP8: allow to re-initialize the Strips w/o restart 2017-04-18 15:01:54 +02:00
bce08cf4f3 FP8: experiment with selection-mode 2017-04-18 13:39:42 +02:00
629b5e0446 clear + re-init faderport at disconnect 2017-04-18 03:20:33 +02:00
dbb3c47eee Only check active_state when potentially skipping the route processing.
In the past, we skipped processing if the routes had no inputs or outputs.
But:
  A route with a generator plugin should work even if it has no inputs.
  A route with "sends" should work even if it has no outputs.
2017-04-17 19:36:31 -05:00
8e5a972a24 Managed to trigger an assert()
Create new Mixbus session, initially incrementally adding Busses to
the session triggers a series of "assign_stripables()"
2017-04-17 23:50:11 +02:00
d6b36a13a1 Flush processor (re-activate) on route active change
(flush reverb tails etc)

PS. That comment "from RT audio thread" was wrong.
Route::flush_processors () is called from flush_all_inserts()
from Session::non_realtime_stop() which is not in rt-context.
Besides, the processor-lock regardless of the process_lock.
2017-04-17 21:15:27 +02:00
515c0687b4 amend 649b9e92f, backport MB code 2017-04-17 20:34:18 +02:00
649b9e92ff Backport some MB specifics (to avoid -Wmisleading-indentation) 2017-04-17 20:23:07 +02:00
91e56ee8ca Update well-known controls (Ardour, Mixbus, 32C) 2017-04-17 20:13:46 +02:00
84804f7d90 cont'd FP8 tweaks
* include Mixbus PRE plugin on Mixbusses
* Mixbus master-assign on right-most "S" button
* fix parameter-banking and assignment
* fix typo in 029e963fb (fader range constaint)
2017-04-17 20:06:00 +02:00
272e02b6c8 Fix string-convert tests for Windows and hopefully macOS/OS X
Tests requires a locale installed on the host that uses a comma as the decimal
mark/point.
2017-04-17 13:21:02 +10:00
c6747c9325 NO-OP: whitespace 2017-04-17 01:50:12 +02:00
3d0366d46b Send unmap event when removing a widget
This fixes a crash when hiding an ArdourCanvas Item VCA which
is about to display a tooltip.
2017-04-17 01:46:27 +02:00
aff92a019d Stop tooltip timeout when a canvas-widget or item is hidden. 2017-04-17 01:45:25 +02:00
976e03c15c Fix crashes with empty route-lists e.g. mute_release w/o routes 2017-04-16 23:48:49 +02:00
029e963fb5 FP8: limit fader range
In case of VCA masters or otherwise the value can exceed the max
+6dB and internal_to_interface() returns a value > 1.0 which cannot
be represented on the physical fader (MIDI &0x7f wraps)
2017-04-16 23:48:06 +02:00
55cd96df8d Clean up after generic MIDI surface -- #7311
When there are some non-released MIDIControllables, signal are still
delivered to the objects, even if there's no surface thread to handle
the signals anymore.
2017-04-16 19:06:17 +02:00
licorne-sama
7fe769fd14 Fixed the loop control
Works now perfectly fine with factory defaults
2017-04-16 09:05:14 -07:00
licorne-sama
62a1fd28d5 Create midi map for Arturia's KeyLab 49
Basic midi map for this midi keyboard. Works with device's factory settings, except for the loop button (see end of file). Transport control is available through MMC.
2017-04-16 09:05:14 -07:00
2e1a884d6e Fix Doxygen syntax (amend/revert f1a4767ac)
1st line after /**  brief description.
Doxygen is used for Ardour's online source doc and the Lua class reference.
2017-04-16 17:26:58 +02:00
67f2e4b866 FP8: add metronome level reset 2017-04-16 17:18:23 +02:00
f18f7dca43 Accommodate newly introduced source(s) in our MSVC project (libpbd) 2017-04-16 12:53:11 +01:00
c634daef6a Add locale independent and thread safe string conversion API with tests
All conversions are performed as if in the "C" locale but without actually
changing locale.

This is a wrapper around printf/sscanf for int types which aren't affected by
locale and uses glib functions g_ascii_strtod and g_ascii_dtostr for
float/double types.

My first attempt at this used std::stringstream and
ios::imbue(std::locale::classic()) as it should be thread safe, but testing
shows it is not for gcc/mingw-w64 on Windows, and possibly also some versions
of macOS/OS X.

Use "yes" and "no" when converting a boolean in PBD::string_to<bool> as this
seems to be the convention used throughout libardour which will allow using
string_to<bool> in those cases.

Add accepted bool string values from PBD::string_is_affirmative to
PBD::string_to<bool>

Mark strings in pbd/string_convert.cc as not for translation

Add u/int16_t string conversions to pbd/string_convert.h and tests

Add DEBUG_TRACE output on conversion errors

Add int8_t/uint8_t conversions(using int16/uint16 types) to string_convert.h

Add support for converting an infinity expression to/from string

Follows the C99/C11 standard for strtof/strtod where subject sequence is an
optional plus or minus sign then INF or INFINITY, ignoring case.
2017-04-16 14:02:41 +10:00
78b82b7ff2 Add PBD::DEBUG::StringConvert debug bit
This is for debugging errors with string conversion for cases where errors
aren't handled
2017-04-16 14:02:41 +10:00
58726cedf8 Fix indentation in ARDOUR::Amp::set_state 2017-04-16 14:02:28 +10:00
50ccd15d72 Fix indentation in MonitorProcessor::state 2017-04-16 14:02:20 +10:00
31b4fae88b Fix indentation in ardour/enums.cc 2017-04-16 14:02:12 +10:00
f1a4767ac5 Fix indentation and make comment style consistent in PBD::PropertyList header 2017-04-16 14:02:03 +10:00
4d9690930a Silence -Wunused-value 2017-04-16 00:15:53 +02:00