summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_playlist.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-09-28 17:23:52 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-09-28 17:23:52 +0000
commit93c7aeba048f19df5abee5e4325ef8b0ef62c279 (patch)
tree5bc2149d17fb5272c5b6284f7e902faad39a92f7 /libs/ardour/audio_playlist.cc
parent3e6feb62ae37cbf98364ccb36e9be47a52ceb8bf (diff)
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
Diffstat (limited to 'libs/ardour/audio_playlist.cc')
-rw-r--r--libs/ardour/audio_playlist.cc23
1 files changed, 11 insertions, 12 deletions
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<Region> 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<Region> 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