#include "mouse_cursors.h"
#include "editor_cursors.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
}
if (sfbrowser == 0) {
- sfbrowser = new SoundFileOmega (_("Add Existing Media"), _session, 0, true, mode_hint);
+ sfbrowser = new SoundFileOmega (_("Add Existing Media"), _session, 0, 0, true, mode_hint);
} else {
sfbrowser->set_mode (mode_hint);
}
gtk_main_iteration ();
}
- import_status.done = true;
+ // wait for thread to terminate
+ while (!import_status.done) {
+ gtk_main_iteration ();
+ }
int result = -1;
{
if (!existing_track) {
if (ar) {
- list<boost::shared_ptr<AudioTrack> > at (_session->new_audio_track (in_chans, out_chans, Normal, 0, 1));
+ list<boost::shared_ptr<AudioTrack> > at (_session->new_audio_track (in_chans, out_chans, 0, 1, string(), PresentationInfo::max_order, Normal));
if (at.empty()) {
return -1;
}
+ if (Config->get_strict_io ()) {
+ for (list<boost::shared_ptr<AudioTrack> >::iterator i = at.begin(); i != at.end(); ++i) {
+ (*i)->set_strict_io (true);
+ }
+ }
existing_track = at.front();
} else if (mr) {
list<boost::shared_ptr<MidiTrack> > mt (
_session->new_midi_track (ChanCount (DataType::MIDI, 1),
ChanCount (DataType::MIDI, 1),
- instrument,
- Normal, 0, 1));
+ instrument, (Plugin::PresetRecord*) 0,
+ (RouteGroup*) 0,
+ 1,
+ string(),
+ PresentationInfo::max_order));
if (mt.empty()) {
return -1;
}
+ if (Config->get_strict_io ()) {
+ for (list<boost::shared_ptr<MidiTrack> >::iterator i = mt.begin(); i != mt.end(); ++i) {
+ (*i)->set_strict_io (true);
+ }
+ }
+ // TODO set strict_io from preferences
existing_track = mt.front();
}
return -1;
}
- list<boost::shared_ptr<AudioTrack> > at (_session->new_audio_track (in_chans, out_chans, Destructive));
+ list<boost::shared_ptr<AudioTrack> > at (_session->new_audio_track (in_chans, out_chans, 0, 1, string(), PresentationInfo::max_order, Destructive));
if (!at.empty()) {
boost::shared_ptr<Playlist> playlist = at.front()->playlist();
boost::shared_ptr<Region> copy (RegionFactory::create (region, true));
playlist->add_region (copy, pos);
_session->add_command (new StatefulDiffCommand (playlist));
}
+ if (Config->get_strict_io ()) {
+ for (list<boost::shared_ptr<AudioTrack> >::iterator i = at.begin(); i != at.end(); ++i) {
+ (*i)->set_strict_io (true);
+ }
+ }
break;
}
}