using namespace ARDOUR;
using namespace sigc;
using namespace std;
+using namespace PBD;
AudioPlaylist::State::~State ()
{
its OK to block (for short intervals).
*/
- LockMonitor rm (region_lock, __LINE__, __FILE__);
+ Glib::Mutex::Lock rm (region_lock);
end = start + cnt - 1;
for (vector<uint32_t>::iterator l = relevant_layers.begin(); l != relevant_layers.end(); ++l) {
+ // FIXME: Should be vector<AudioRegion*>
vector<Region*>& r (relevant_regions[*l]);
vector<Crossfade*>& x (relevant_xfades[*l]);
for (vector<Region*>::iterator i = r.begin(); i != r.end(); ++i) {
- (*i)->read_at (buf, mixdown_buffer, gain_buffer, workbuf, start, cnt, chan_n, read_frames, skip_frames);
- _read_data_count += (*i)->read_data_count();
+ AudioRegion* const ar = dynamic_cast<AudioRegion*>(*i);
+ assert(ar);
+ ar->read_at (buf, mixdown_buffer, gain_buffer, workbuf, start, cnt, chan_n, read_frames, skip_frames);
+ _read_data_count += ar->read_data_count();
}
for (vector<Crossfade*>::iterator i = x.begin(); i != x.end(); ++i) {
-
(*i)->read_at (buf, mixdown_buffer, gain_buffer, workbuf, start, cnt, chan_n);
/* don't JACK up _read_data_count, since its the same data as we just
void AudioPlaylist::notify_crossfade_added (Crossfade *x)
{
- if (atomic_read(&block_notifications)) {
+ if (g_atomic_int_get(&block_notifications)) {
_pending_xfade_adds.insert (_pending_xfade_adds.end(), x);
} else {
NewCrossfade (x); /* EMIT SIGNAL */
AudioRegion* ar = dynamic_cast<AudioRegion*> (*i);
- if (ar && ar->equivalent (other)) {
- results.push_back (ar);
+ if (ar) {
+ if (Config->get_use_overlap_equivalency()) {
+ if (ar->overlap_equivalent (other)) {
+ results.push_back (ar);
+ } else if (ar->equivalent (other)) {
+ results.push_back (ar);
+ }
+ }
}
}
}