Merge branch 'clang' of https://github.com/axetota/ardour
This commit is contained in:
commit
ebcb1ffe7b
@ -658,7 +658,7 @@ AUPluginUI::parent_cocoa_window ()
|
|||||||
|
|
||||||
/* move the au_view down so that it doesn't overlap the top_box contents */
|
/* move the au_view down so that it doesn't overlap the top_box contents */
|
||||||
|
|
||||||
NSPoint origin = { 0, a.height };
|
NSPoint origin = { 0, static_cast<CGFloat> (a.height) };
|
||||||
|
|
||||||
[au_view setFrameOrigin:origin];
|
[au_view setFrameOrigin:origin];
|
||||||
[view addSubview:au_view positioned:NSWindowBelow relativeTo:nil];
|
[view addSubview:au_view positioned:NSWindowBelow relativeTo:nil];
|
||||||
|
@ -997,18 +997,18 @@ AudioClock::set_slave_info ()
|
|||||||
|
|
||||||
switch (sync_src) {
|
switch (sync_src) {
|
||||||
case JACK:
|
case JACK:
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span></span>",
|
||||||
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
||||||
_right_layout->set_text ("");
|
_right_layout->set_text ("");
|
||||||
break;
|
break;
|
||||||
case MIDIClock:
|
case MIDIClock:
|
||||||
if (slave) {
|
if (slave) {
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span></span>",
|
||||||
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
||||||
_right_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span></span>",
|
_right_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span></span>",
|
||||||
INFO_FONT_SIZE, slave->approximate_current_delta()));
|
INFO_FONT_SIZE, slave->approximate_current_delta()));
|
||||||
} else {
|
} else {
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span></span>",
|
||||||
INFO_FONT_SIZE, _("--pending--")));
|
INFO_FONT_SIZE, _("--pending--")));
|
||||||
_right_layout->set_text ("");
|
_right_layout->set_text ("");
|
||||||
}
|
}
|
||||||
@ -1020,21 +1020,21 @@ AudioClock::set_slave_info ()
|
|||||||
TimecodeSlave* tcslave;
|
TimecodeSlave* tcslave;
|
||||||
if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
|
if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
|
||||||
matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format());
|
matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format());
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span><span foreground=\"%3\">%4</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span><span foreground=\"%3\">%4</span></span>",
|
||||||
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)[0], (matching?"green":"red"),
|
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)[0], (matching?"green":"red"),
|
||||||
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
|
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
|
||||||
_right_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span></span>",
|
_right_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span></span>",
|
||||||
INFO_FONT_SIZE, slave->approximate_current_delta()));
|
INFO_FONT_SIZE, slave->approximate_current_delta()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2</span></span>",
|
||||||
INFO_FONT_SIZE, _("--pending--")));
|
INFO_FONT_SIZE, _("--pending--")));
|
||||||
_right_layout->set_text ("");
|
_right_layout->set_text ("");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"INT/%2</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "INT/%2</span></span>",
|
||||||
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
INFO_FONT_SIZE, sync_source_to_string(sync_src, true)));
|
||||||
_right_layout->set_text ("");
|
_right_layout->set_text ("");
|
||||||
}
|
}
|
||||||
@ -1079,17 +1079,17 @@ AudioClock::set_frames (framepos_t when, bool /*force*/)
|
|||||||
sprintf (buf, "%" PRId64 "Hz", rate);
|
sprintf (buf, "%" PRId64 "Hz", rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2 </span><span foreground=\"green\">%3</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2 </span><span foreground=\"green\">%3</span></span>",
|
||||||
INFO_FONT_SIZE, _("SR"), buf));
|
INFO_FONT_SIZE, _("SR"), buf));
|
||||||
|
|
||||||
float vid_pullup = _session->config.get_video_pullup();
|
float vid_pullup = _session->config.get_video_pullup();
|
||||||
|
|
||||||
if (vid_pullup == 0.0) {
|
if (vid_pullup == 0.0) {
|
||||||
_right_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2 </span><span foreground=\"green\">off</span></span>",
|
_right_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2 </span><span foreground=\"green\">off</span></span>",
|
||||||
INFO_FONT_SIZE, _("Pull")));
|
INFO_FONT_SIZE, _("Pull")));
|
||||||
} else {
|
} else {
|
||||||
sprintf (buf, _("%+.4f%%"), vid_pullup);
|
sprintf (buf, _("%+.4f%%"), vid_pullup);
|
||||||
_right_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%2 </span><span foreground=\"green\">%3</span></span>",
|
_right_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%2 </span><span foreground=\"green\">%3</span></span>",
|
||||||
INFO_FONT_SIZE, _("Pull"), buf));
|
INFO_FONT_SIZE, _("Pull"), buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1233,11 +1233,11 @@ AudioClock::set_bbt (framepos_t when, bool /*force*/)
|
|||||||
TempoMetric m (_session->tempo_map().metric_at (pos));
|
TempoMetric m (_session->tempo_map().metric_at (pos));
|
||||||
|
|
||||||
sprintf (buf, "%-5.1f", m.tempo().beats_per_minute());
|
sprintf (buf, "%-5.1f", m.tempo().beats_per_minute());
|
||||||
_left_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%3</span> <span foreground=\"green\">%2</span></span>",
|
_left_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%3</span> <span foreground=\"green\">%2</span></span>",
|
||||||
INFO_FONT_SIZE, buf, _("Tempo")));
|
INFO_FONT_SIZE, buf, _("Tempo")));
|
||||||
|
|
||||||
sprintf (buf, "%g/%g", m.meter().divisions_per_bar(), m.meter().note_divisor());
|
sprintf (buf, "%g/%g", m.meter().divisions_per_bar(), m.meter().note_divisor());
|
||||||
_right_layout->set_markup (string_compose ("<span size=\"%1\">"TXTSPAN"%3</span> <span foreground=\"green\">%2</span></span>",
|
_right_layout->set_markup (string_compose ("<span size=\"%1\">" TXTSPAN "%3</span> <span foreground=\"green\">%2</span></span>",
|
||||||
INFO_FONT_SIZE, buf, _("Meter")));
|
INFO_FONT_SIZE, buf, _("Meter")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ set_language_preference ()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NSRange r = { 0, count };
|
NSRange r = { 0, static_cast<NSUInteger> (count) };
|
||||||
setenv ("LANGUAGE", [[[languages subarrayWithRange:r] componentsJoinedByString:@":"] UTF8String], 0);
|
setenv ("LANGUAGE", [[[languages subarrayWithRange:r] componentsJoinedByString:@":"] UTF8String], 0);
|
||||||
cout << "LANGUAGE set to " << getenv ("LANGUAGE") << endl;
|
cout << "LANGUAGE set to " << getenv ("LANGUAGE") << endl;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ class ProxyWithConstructor: public ProxyBase {
|
|||||||
: ProxyBase (name, menu_name) , creator (c) {}
|
: ProxyBase (name, menu_name) , creator (c) {}
|
||||||
|
|
||||||
ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c, const XMLNode* node)
|
ProxyWithConstructor (const std::string& name, const std::string& menu_name, const boost::function<T*()>& c, const XMLNode* node)
|
||||||
: ProxyBase (name, menu_name, node) , creator (c) {}
|
: ProxyBase (name, menu_name, *node) , creator (c) {}
|
||||||
|
|
||||||
Gtk::Window* get (bool create = false) {
|
Gtk::Window* get (bool create = false) {
|
||||||
if (!_window) {
|
if (!_window) {
|
||||||
@ -198,7 +198,7 @@ class Proxy : public ProxyBase {
|
|||||||
: ProxyBase (name, menu_name) {}
|
: ProxyBase (name, menu_name) {}
|
||||||
|
|
||||||
Proxy (const std::string& name, const std::string& menu_name, const XMLNode* node)
|
Proxy (const std::string& name, const std::string& menu_name, const XMLNode* node)
|
||||||
: ProxyBase (name, menu_name, node) {}
|
: ProxyBase (name, menu_name, *node) {}
|
||||||
|
|
||||||
Gtk::Window* get (bool create = false) {
|
Gtk::Window* get (bool create = false) {
|
||||||
if (!_window) {
|
if (!_window) {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "flag_field.h"
|
#include "flag_field.h"
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
@ -24,7 +25,7 @@ struct DebugUtils
|
|||||||
char * res = abi::__cxa_demangle (typeid(obj).name(), 0, 0, &status);
|
char * res = abi::__cxa_demangle (typeid(obj).name(), 0, 0, &status);
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
std::string s(res);
|
std::string s(res);
|
||||||
free (res);
|
std::free (res);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,7 +123,7 @@ public:
|
|||||||
return time() < o.time();
|
return time() < o.time();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bank != o.bank()) {
|
if (bank() != o.bank()) {
|
||||||
return bank() < o.bank();
|
return bank() < o.bank();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
#if __clang__
|
||||||
|
#include "evoral/Note.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "pbd/compose.h"
|
#include "pbd/compose.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
|
|
||||||
|
@ -20,6 +20,14 @@
|
|||||||
#ifndef __libmisc_stl_delete_h__
|
#ifndef __libmisc_stl_delete_h__
|
||||||
#define __libmisc_stl_delete_h__
|
#define __libmisc_stl_delete_h__
|
||||||
|
|
||||||
|
|
||||||
|
#if __clang__ && __APPLE__ && __cplusplus >= 201103L
|
||||||
|
#include <vector>
|
||||||
|
#ifndef _CPP_VECTOR
|
||||||
|
#define _CPP_VECTOR
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* To actually use any of these deletion functions, you need to
|
/* To actually use any of these deletion functions, you need to
|
||||||
first include the revelant container type header.
|
first include the revelant container type header.
|
||||||
*/
|
*/
|
||||||
|
@ -56,15 +56,15 @@ probe_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static ControlProtocolDescriptor generic_midi_descriptor = {
|
static ControlProtocolDescriptor generic_midi_descriptor = {
|
||||||
name : "Generic MIDI",
|
.name = "Generic MIDI",
|
||||||
id : "uri://ardour.org/surfaces/generic_midi:0",
|
.id = "uri://ardour.org/surfaces/generic_midi:0",
|
||||||
ptr : 0,
|
.ptr = 0,
|
||||||
module : 0,
|
.module = 0,
|
||||||
mandatory : 0,
|
.mandatory = 0,
|
||||||
supports_feedback : true,
|
.supports_feedback = true,
|
||||||
probe : probe_generic_midi_protocol,
|
.probe = probe_generic_midi_protocol,
|
||||||
initialize : new_generic_midi_protocol,
|
.initialize = new_generic_midi_protocol,
|
||||||
destroy : delete_generic_midi_protocol
|
.destroy = delete_generic_midi_protocol
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
18
wscript
18
wscript
@ -110,6 +110,22 @@ def set_compiler_flags (conf,opt):
|
|||||||
|
|
||||||
# waf adds -O0 -g itself. thanks waf!
|
# waf adds -O0 -g itself. thanks waf!
|
||||||
is_clang = conf.env['CXX'][0].endswith('clang++')
|
is_clang = conf.env['CXX'][0].endswith('clang++')
|
||||||
|
|
||||||
|
if conf.options.cxx11:
|
||||||
|
conf.check_cxx(cxxflags=["-std=c++11"])
|
||||||
|
conf.env.append_unique('CXXFLAGS', ['-std=c++11'])
|
||||||
|
if platform == "darwin":
|
||||||
|
conf.env.append_unique('CXXFLAGS', ['-stdlib=libc++'])
|
||||||
|
conf.env.append_unique('LINKFLAGS', ['-lc++'])
|
||||||
|
# Prevents visibility issues in standard headers
|
||||||
|
conf.define("_DARWIN_C_SOURCE", 1)
|
||||||
|
|
||||||
|
if is_clang and platform == "darwin":
|
||||||
|
# Silence warnings about the non-existing osx clang compiler flags
|
||||||
|
# -compatibility_version and -current_version. These are Waf
|
||||||
|
# generated and not needed with clang
|
||||||
|
conf.env.append_unique ("CXXFLAGS", ["-Qunused-arguments"])
|
||||||
|
|
||||||
if opt.gprofile:
|
if opt.gprofile:
|
||||||
debug_flags = [ '-pg' ]
|
debug_flags = [ '-pg' ]
|
||||||
|
|
||||||
@ -454,6 +470,8 @@ def options(opt):
|
|||||||
help='directory where Wine\'s Windows header files can be found')
|
help='directory where Wine\'s Windows header files can be found')
|
||||||
opt.add_option('--noconfirm', action='store_true', default=False, dest='noconfirm',
|
opt.add_option('--noconfirm', action='store_true', default=False, dest='noconfirm',
|
||||||
help='Do not ask questions that require confirmation during the build')
|
help='Do not ask questions that require confirmation during the build')
|
||||||
|
opt.add_option('--cxx11', action='store_true', default=False, dest='cxx11',
|
||||||
|
help='Turn on c++11 compiler flags (-std=c++11)')
|
||||||
for i in children:
|
for i in children:
|
||||||
opt.recurse(i)
|
opt.recurse(i)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user