return _automatable.control(id);
}
- /* export */
-
- int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&);
-
/* xfade/fade interactions */
void suspend_fade_in ();
/* export */
- int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&);
-
boost::shared_ptr<MidiModel> model();
boost::shared_ptr<const MidiModel> model() const;
bool region_list_equivalent (boost::shared_ptr<const Region>) const;
bool source_equivalent (boost::shared_ptr<const Region>) const;
bool uses_source (boost::shared_ptr<const Source>) const;
- bool uses_source_path (const std::string&) const;
std::string source_string () const;
void set_length (framecnt_t);
void set_start (framepos_t);
void set_position (framepos_t);
- void set_position_on_top (framepos_t);
void special_set_position (framepos_t);
virtual void update_after_tempo_map_change ();
void nudge_position (frameoffset_t);
virtual bool is_dependent() const { return false; }
virtual bool depends_on (boost::shared_ptr<Region> /*other*/) const { return false; }
- virtual int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) = 0;
-
virtual void add_transient (framepos_t) {
// no transients, but its OK
}
return audio_source(channel)->read (buf, pos, cnt);
}
-int
-AudioRegion::exportme (Session& /*session*/, ARDOUR::ExportSpecification& /*spec*/)
-{
- // TODO EXPORT
-// const framecnt_t blocksize = 4096;
-// framecnt_t to_read;
-// int status = -1;
-//
-// spec.channels = _sources.size();
-//
-// if (spec.prepare (blocksize, session.frame_rate())) {
-// goto out;
-// }
-//
-// spec.pos = 0;
-// spec.total_frames = _length;
-//
-// while (spec.pos < _length && !spec.stop) {
-//
-//
-// /* step 1: interleave */
-//
-// to_read = min (_length - spec.pos, blocksize);
-//
-// if (spec.channels == 1) {
-//
-// if (read_raw_internal (spec.dataF, _start + spec.pos, to_read) != to_read) {
-// goto out;
-// }
-//
-// } else {
-//
-// Sample buf[blocksize];
-//
-// for (uint32_t chan = 0; chan < spec.channels; ++chan) {
-//
-// if (audio_source(chan)->read (buf, _start + spec.pos, to_read) != to_read) {
-// goto out;
-// }
-//
-// for (framecnt_t x = 0; x < to_read; ++x) {
-// spec.dataF[chan+(x*spec.channels)] = buf[x];
-// }
-// }
-// }
-//
-// if (spec.process (to_read)) {
-// goto out;
-// }
-//
-// spec.pos += to_read;
-// spec.progress = (double) spec.pos /_length;
-//
-// }
-//
-// status = 0;
-//
-// out:
-// spec.running = false;
-// spec.status = status;
-// spec.clear();
-//
-// return status;
- return 0;
-}
-
void
AudioRegion::set_scale_amplitude (gain_t g)
{
return midi_source()->model();
}
-int
-MidiRegion::exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&)
-{
- return -1;
-}
-
boost::shared_ptr<MidiSource>
MidiRegion::midi_source (uint32_t n) const
{
}
}
-void
-Region::set_position_on_top (framepos_t pos)
-{
- if (locked()) {
- return;
- }
-
- if (_position != pos) {
- set_position_internal (pos, true);
- }
-
- boost::shared_ptr<Playlist> pl (playlist());
-
- if (pl) {
- pl->raise_region_to_top (shared_from_this ());
- }
-
- /* do this even if the position is the same. this helps out
- a GUI that has moved its representation already.
- */
- send_change (Properties::position);
-}
-
void
Region::recompute_position_from_lock_style ()
{
return false;
}
-bool
-Region::uses_source_path (const std::string& path) const
-{
- for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) {
- boost::shared_ptr<const FileSource> fs = boost::dynamic_pointer_cast<const FileSource> (*i);
- if (fs) {
- if (fs->path() == path) {
- return true;
- }
- }
- }
- return false;
-}
-
framecnt_t
Region::source_length(uint32_t n) const
{