13
0

Merge branch 'master' of git.ardour.org:ardour/ardour

This commit is contained in:
Paul Davis 2013-03-24 17:06:46 -04:00
commit 52363ebefd
4 changed files with 45 additions and 22 deletions

View File

@ -527,13 +527,25 @@ RegionExportChannelSelector::handle_selection ()
CriticalSelectionChanged ();
}
/* Track export channel selector */
TrackExportChannelSelector::TrackExportChannelSelector (ARDOUR::Session * session, ProfileManagerPtr manager)
: ExportChannelSelector(session, manager)
, region_contents_button(source_group, _("Export region contents"))
, track_output_button(source_group, _("Export track output"))
{
pack_start(main_layout);
// Options
options_box.pack_start(region_contents_button);
options_box.pack_start(track_output_button);
main_layout.pack_start(options_box);
// Track scroller
track_scroller.add (track_view);
track_scroller.set_size_request (-1, 130);
track_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
pack_start(track_scroller);
main_layout.pack_start(track_scroller);
// Track list
track_list = Gtk::ListStore::create (track_cols);
@ -613,22 +625,23 @@ TrackExportChannelSelector::update_config()
boost::shared_ptr<Route> route = row[track_cols.route];
/* Output of track code. TODO make this an option also
uint32_t outs = route->n_ports().n_audio();
for (uint32_t i = 0; i < outs; ++i) {
AudioPort * port = route->audio (i);
if (port) {
ExportChannelPtr channel (new PortExportChannel ());
PortExportChannel * pec = static_cast<PortExportChannel *> (channel.get());
pec->add_port(port);
state->config->register_channel(channel);
if (track_output_button.get_active()) {
uint32_t outs = route->n_outputs().n_audio();
for (uint32_t i = 0; i < outs; ++i) {
boost::shared_ptr<AudioPort> port = route->output()->audio (i);
if (port) {
ExportChannelPtr channel (new PortExportChannel ());
PortExportChannel * pec = static_cast<PortExportChannel *> (channel.get());
pec->add_port(port);
state->config->register_channel(channel);
}
}
} else {
std::list<ExportChannelPtr> list;
RouteExportChannel::create_from_route (list, route);
state->config->register_channels (list);
}
*/
std::list<ExportChannelPtr> list;
RouteExportChannel::create_from_route (list, route);
state->config->register_channels (list);
state->config->set_name (route->name());
}

View File

@ -235,15 +235,17 @@ class TrackExportChannelSelector : public ExportChannelSelector
private:
void fill_list();
void add_track (boost::shared_ptr<ARDOUR::Route> route);
void add_track (boost::shared_ptr<ARDOUR::Route> route);
void update_config();
ChannelConfigList configs;
Gtk::VBox main_layout;
struct TrackCols : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
Gtk::TreeModelColumn<std::string> label;
Gtk::TreeModelColumn<bool> selected;
@ -256,6 +258,10 @@ class TrackExportChannelSelector : public ExportChannelSelector
Gtk::ScrolledWindow track_scroller;
Gtk::HBox options_box;
Gtk::RadioButton::Group source_group;
Gtk::RadioButton region_contents_button;
Gtk::RadioButton track_output_button;
};
#endif /* __export_channel_selector_h__ */

View File

@ -34,7 +34,11 @@ static uint64_t _debug_bit = 1;
typedef std::map<const char*,uint64_t> DebugMap;
namespace PBD {
DebugMap _debug_bit_map;
DebugMap & _debug_bit_map()
{
static DebugMap map;
return map;
}
}
uint64_t PBD::DEBUG::Stateful = PBD::new_debug_bit ("stateful");
@ -50,7 +54,7 @@ uint64_t
PBD::new_debug_bit (const char* name)
{
uint64_t ret;
_debug_bit_map.insert (make_pair (name, _debug_bit));
_debug_bit_map().insert (make_pair (name, _debug_bit));
ret = _debug_bit;
_debug_bit <<= 1;
return ret;
@ -91,7 +95,7 @@ PBD::parse_debug_options (const char* str)
return 0;
}
for (map<const char*,uint64_t>::iterator i = _debug_bit_map.begin(); i != _debug_bit_map.end(); ++i) {
for (map<const char*,uint64_t>::iterator i = _debug_bit_map().begin(); i != _debug_bit_map().end(); ++i) {
if (strncasecmp (p, i->first, strlen (p)) == 0) {
bits |= i->second;
}
@ -113,7 +117,7 @@ PBD::list_debug_options ()
vector<string> options;
for (map<const char*,uint64_t>::iterator i = _debug_bit_map.begin(); i != _debug_bit_map.end(); ++i) {
for (map<const char*,uint64_t>::iterator i = _debug_bit_map().begin(); i != _debug_bit_map().end(); ++i) {
options.push_back (i->first);
}

View File

@ -112,10 +112,10 @@ def build(bld):
# Library
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
print 'BUILD SHARED LIB'
print('BUILD SHARED LIB')
obj = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources)
else:
print 'BUILD STATIC LIB'
print('BUILD STATIC LIB')
obj = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
obj.cxxflags = [ '-fPIC' ]