From 93c7aeba048f19df5abee5e4325ef8b0ef62c279 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 28 Sep 2006 17:23:52 +0000 Subject: fixes for destructive track offsets of various kinds; move from jack_nframes_t -> nframes_t git-svn-id: svn://localhost/ardour2/trunk@933 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/audio_playlist.cc | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'libs/ardour/audio_playlist.cc') diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index e7e410afe3..526003e6b2 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -115,7 +115,7 @@ AudioPlaylist::AudioPlaylist (const AudioPlaylist& other, string name, bool hidd } } -AudioPlaylist::AudioPlaylist (const AudioPlaylist& other, jack_nframes_t start, jack_nframes_t cnt, string name, bool hidden) +AudioPlaylist::AudioPlaylist (const AudioPlaylist& other, nframes_t start, nframes_t cnt, string name, bool hidden) : Playlist (other, start, cnt, name, hidden) { save_state (_("initial state")); @@ -162,14 +162,14 @@ struct RegionSortByLayer { } }; -jack_nframes_t -AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, jack_nframes_t start, - jack_nframes_t cnt, unsigned chan_n) +nframes_t +AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t start, + nframes_t cnt, unsigned chan_n) { - jack_nframes_t ret = cnt; - jack_nframes_t end; - jack_nframes_t read_frames; - jack_nframes_t skip_frames; + nframes_t ret = cnt; + nframes_t end; + nframes_t read_frames; + nframes_t skip_frames; /* optimizing this memset() away involves a lot of conditionals that may well cause more of a hit due to cache misses @@ -204,7 +204,6 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, ja for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { if ((*i)->coverage (start, end) != OverlapNone) { - relevant_regions[(*i)->layer()].push_back (*i); relevant_layers.push_back ((*i)->layer()); } @@ -440,7 +439,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) audio engineering. */ - jack_nframes_t xfade_length = min ((jack_nframes_t) 720, top->length()); + nframes_t xfade_length = min ((nframes_t) 720, top->length()); /* in, out */ xfade = new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn); @@ -882,12 +881,12 @@ AudioPlaylist::region_changed (Change what_changed, boost::shared_ptr re } void -AudioPlaylist::crossfades_at (jack_nframes_t frame, Crossfades& clist) +AudioPlaylist::crossfades_at (nframes_t frame, Crossfades& clist) { RegionLock rlock (this); for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) { - jack_nframes_t start, end; + nframes_t start, end; start = (*i)->position(); end = start + (*i)->overlap_length(); // not length(), important difference -- cgit v1.2.3