13
0
Commit Graph

24373 Commits

Author SHA1 Message Date
b6c222555f NO-OP: re-order code, add comments 2017-04-20 17:19:03 +02:00
8add4eefad FP8: some code comments and cleanup 2017-04-20 16:06:47 +02:00
24699d3be4 Changes needed for building Tim's new 'string_convert' stuff with MSVC (gtk2_ardour) 2017-04-19 17:25:53 +01:00
873a469686 Changes needed for building Tim's new 'string_convert' stuff with MSVC (libardour) 2017-04-19 17:25:52 +01:00
251db7a608 Changes needed for building Tim's new 'string_convert' stuff with MSVC (libpbd) 2017-04-19 17:25:51 +01:00
df98be1240 Don't explicitly store Auditioner -> Monitor connections.
The monitor section connection is implicit and done by default.
This fixes an issue with the auditioner connections being lost when
switching between sessions that use/don't use the monitor-section.

Previously:
1) load session with monitor section, save session
  -> global config explicitly saved
  "auditioner-output-left" -> "ardour:Monitor/audio_in 1"

2) Load a session w/o monitor-section. The config is parsed,
  "ardour:Monitor/audio_in" port does not exist, connection was lost.
2017-04-19 16:41:51 +02:00
c8aa78af07 Prefer boolean over literal 2017-04-19 12:51:11 +02:00
8f1cc261a2 Remove cruft. ChanCount::INFINITE is not used 2017-04-19 11:43:08 +02:00
89815f7d59 Change header include order to try and avoid INFINITE define on windows
This doesn't seem to be an issue with a newer version of the Mingw-w64 headers
that I use (5.0.2rc2).
2017-04-19 18:08:40 +10:00
21077018b8 Use PBD::string_to_uint32 in Playlist class instead of boost::lexical_cast 2017-04-19 09:37:02 +10:00
e097e0511f Use fixed size type for Playlist sort id as it is serialized 2017-04-19 09:37:02 +10:00
da8146f011 Use PBD::to_string in AutomationTimeAxis instead of boost::lexical_cast and string_compose 2017-04-19 09:37:02 +10:00
1ce58ad90a Add additional PBD::string_to/to_string specializations for PBD::ID 2017-04-19 09:37:02 +10:00
baa1bff5ec Use PBD::to_string to set state-dir property in LV2Plugin
To prevent issues with numeric grouping with formatting used by string_compose
template/stringstream when global C++ locale != "C"
2017-04-19 09:37:01 +10:00
19f9158dc6 Use PBD::to_string() in LV2Plugin instead of string_compose for state_dir
To prevent issues with numeric grouping with formatting used by string_compose
template/stringstream when global C++ locale != "C"
2017-04-19 09:37:01 +10:00
f2e32efc92 Use std::string::operator+ instead of string_compose in VSTPlugin 2017-04-19 09:37:01 +10:00
af1f4b933b Use std::string::operator+() instead of string_compose template in Route class
Using string_compose in this instance doesn't seem necessary, is worse in terms
of readability and is no doubt slower.
2017-04-19 09:37:01 +10:00
4367b51e56 Remove PBD::to_string() function from pbd/convert.h
All uses of this function have now been replaced by PBD::to_string() from
pbd/string_convert.h

Remove this function so that it isn't mistakenly used to perform numeric to
string conversion when the result is being used for serialization as that only
works if the global C++ locale is set with LC_NUMERIC=C, which is the case
currently but may not be in the future.
2017-04-19 09:37:01 +10:00
f597bb5ed7 Use PBD::to_string() from pbd/string_convert.h in VCATimeAxisView 2017-04-19 09:37:01 +10:00
b05ce6fb34 Use PBD::to_string from pbd/string_convert.h in VCAMasterStrip class 2017-04-19 09:37:01 +10:00
addbc86874 Use PBD::to_string from pbd/string_convert.h in SoundFileBox class
Numeric formatting is equivalent.
2017-04-19 09:37:01 +10:00
2889a44a33 Use PBD::to_string from pbd/string_convert.h in RouteTimeAxis
Numeric formatting is equivalent as LC_NUMERIC=C in global C++ locale
2017-04-19 09:37:01 +10:00
99ee7d7b61 Use PBD::to_string from pbd/string_convert.h in MixerStrip class
The numeric formatting is equivalent. Even though this string is being used in
the UI as a label I think this is another case where we don't want a localized
numeric string, which would only be relevant with a track count >=1000.
2017-04-19 09:37:01 +10:00
e157a84c2b Use PBD::to_string from pbd/string_convert.h in MeterStrip class
The numeric formatting is equivalent. The string is being used in a label so it
could be argued that we want localized numeric formatting in this case, but as
it is only relevant if we have >=1000 meter strip keep it the same for now.
2017-04-19 09:37:01 +10:00
31a2957700 Use PBD::to_string from pbd/string_convert.h in ExportTimespanSelector
The C++ global locale is currently set to LC_NUMERIC=C by the first instance of
LocaleGuard so this change means numeric formatting is equivalent.

As the string is being used to construct a label, perhaps we do want to
generate localized numeric formatting in this case. Anyway keep it the same for
now.
2017-04-19 09:37:01 +10:00
c149d7d64c Use PBD::to_string() from pbd/string_convert.h in ControlSlaveUI
The numeric formatting is equivalent.
2017-04-19 09:37:01 +10:00
926a064744 Use PBD::to_string from pbd/string_convert.h in WaveView debug code 2017-04-19 09:37:01 +10:00
aede5c85d5 Use PBD::to_string from pbd/string_convert.h in ARDOUR::VCAManager
The numeric formatting is equivalent to iostreams when global C++ locale is set
to "C" without the need for a LocaleGuard.

I'm not sure this would have been an issue as the number of VCA's may never get
high enough for digit grouping of the locale to affect numeric output, but now
it is not a possibility.
2017-04-19 09:37:00 +10:00
2386dc7ede Use PBD::string_to/to_string in ARDOUR::user_config_directory_name()
The numeric formatting is equivalent without requiring a LocaleGuard or the
global C++ locale is "C".
2017-04-19 09:37:00 +10:00
797fbfc5de Use PBD::to_string from pbd/string_convert.h in ARDOUR::ExportFilename
The numeric formatting is equivalent to using iostreams in the C locale without
having to use a LocaleGuard or set global C++ locale.
2017-04-19 09:37:00 +10:00
0ae2985a21 Use XMLNode::get_property in ARDOUR::ElementImporter 2017-04-19 09:37:00 +10:00
5c387b76b8 Use PBD::to_string/string_to in ARDOUR::ElementImporter class 2017-04-19 09:37:00 +10:00
37d76e4104 Use PBD::to_string API from pbd/string_convert.h in AudioFileTagger
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting is
equivalent.
2017-04-19 09:37:00 +10:00
0dbb9e6346 Use PBD::to_string API from pbd/string_convert.h in AudioTrackImporter
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting
is equivalent.

The code in this file has been disabled in the GUI for some time...and I doubt
it would now work correctly.
2017-04-19 09:37:00 +10:00
0de5722fb1 Use PBD::to_string() from pbd/string_convert.h in ardour ALSA utils
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting is
equivalent
2017-04-19 09:37:00 +10:00
bf5864aaca Use PBD::to_string() from pbd/string_convert.h in JACK utils
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard.
2017-04-19 09:37:00 +10:00
ca7bbea6d8 Use PBD::string_to/to_string when de/serializing in AutomationList class
This avoids requiring a LocaleGuard to get the correct numeric formatting and
saves/restores the automation data to the precision required for roundtrip
equality.
2017-04-19 09:37:00 +10:00
c65f30b4b1 Remove unused header include in ARDOUR::Amp source file 2017-04-19 09:36:59 +10:00
18011482bb Use PBD::string_to/to_string in IO::find_possible_bundle
Possible issue with numeric formatting using std::streams in locales with
grouping. Although I don't think it would be an issue in this case use locale
independant alternative for numeric formatting anyway.
2017-04-19 09:36:59 +10:00
e15524cc64 Use PBD::to_string instead of std::ostream when setting up video server url
To avoid issues with locales that use grouping/thousands separators.
2017-04-19 09:36:59 +10:00
ab30f45bba Use PBD::to_string to convert period count in EngineControl class
The functionality is the same so might as well use it.
2017-04-19 09:36:59 +10:00
0739bada9e Use PBD::to_string to convert bufsize to string in EngineControl class
string_compose uses std::ostream/stringstream which will insert thousands
separators in some locales. This was not a problem when LocaleGuard set the
global C++ locale to "C"
2017-04-19 09:36:59 +10:00
df2b0e33b9 Use PBD::string_to functions in VideoUtils::video_query_info
LocaleGuard is in use so float <=> string conversions must be expected in C
locale format
2017-04-19 09:36:59 +10:00
e7a23eaaa8 Use snprintf instead of std::stringstream when converting color values to strings
std::ostream/stringstream will use the current locale to determine the numeric
formatting. If the locale uses grouping then thousands separators will be
inserted in the output which produces an invalid color string in
UIConfiguration::reset_gtk_theme() and when converting colors to strings in
UIConfiguration::store_color_theme()

This has not been a problem so far because it appears that LocaleGuard does not
reset the LC_NUMERIC value for the global C++ locale. So if a LocaleGuard is
created at any time before these functions are called(even if it goes out of
scope) the numeric formatting used by std::streams will use the "C" locale
formatting facets.
2017-04-19 09:36:59 +10:00
0656d5ab1a Use XMLNode::get/set_property API in Faderport surface 2017-04-19 09:36:59 +10:00
ac8b5192cd Remove now unused PBD::string_is_affirmative function
The equivalent function is now PBD::string_to<bool>
2017-04-19 09:36:59 +10:00
71fc5b9e8b Use PBD::string_to<bool> in MidiTimeAxisView class
As the conversion was performed with PBD::to_string
2017-04-19 09:36:59 +10:00
b540817b5b Use PBD::string_to<bool> in RouteTimeAxisView class
As they were converted from bool to string using PBD::to_string
2017-04-19 09:36:59 +10:00
edb9868e76 Remove conditional checks that are always true in RouteTimeAxisView class 2017-04-19 09:36:59 +10:00
23eb1fbf01 Use PBD::string_to<bool>() in GenericMidiControlProtocol class
Equivalent to PBD::string_is_affirmative()
2017-04-19 09:36:59 +10:00