summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-19 05:45:11 +0000
committerDavid Robillard <d@drobilla.net>2009-02-19 05:45:11 +0000
commit8a28ea6154f78d491afe746b3a2b0230185afb91 (patch)
tree35c6b974624bbfc41297dfd08a068585545cf9a0 /libs/ardour/sndfilesource.cc
parent0f71728a925eb8f16c14c74f0dae9fdd53406a20 (diff)
Introduce new time for session-relative frame time, and make source interface capable of handling 64-bit long sessions.
sframes_t is "session frames". The rules for time stamps are: - Anything relative to transport time, session position, etc, should be sframes_t - Anything relative to jack cycles, including the length thereof, should be nframes_t To support sessions which exceed UINT32_MAX frames, we need to replace all the uses of nframes_t for session time with sframes_t, and make sure the conversions are sound. This does not depend on jack's nframes_t; that we are using the same type at all right now was an oops. This is also be kinda nice for readability since the two different time bases have different types... git-svn-id: svn://localhost/ardour2/branches/3.0@4636 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index d651d40970..f759653e58 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -274,7 +274,7 @@ SndFileSource::sample_rate () const
}
nframes_t
-SndFileSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const
+SndFileSource::read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const
{
int32_t nread;
float *ptr;
@@ -482,7 +482,7 @@ SndFileSource::destructive_write_unlocked (Sample* data, nframes_t cnt)
}
int
-SndFileSource::update_header (nframes_t when, struct tm& now, time_t tnow)
+SndFileSource::update_header (sframes_t when, struct tm& now, time_t tnow)
{
set_timeline_position (when);
@@ -506,7 +506,7 @@ SndFileSource::flush_header ()
}
int
-SndFileSource::setup_broadcast_info (nframes_t when, struct tm& now, time_t tnow)
+SndFileSource::setup_broadcast_info (sframes_t when, struct tm& now, time_t tnow)
{
if (!writable()) {
warning << string_compose (_("attempt to store broadcast info in a non-writable audio file source (%1)"), _path) << endmsg;
@@ -556,7 +556,7 @@ SndFileSource::set_header_timeline_position ()
}
nframes_t
-SndFileSource::write_float (Sample* data, nframes_t frame_pos, nframes_t cnt)
+SndFileSource::write_float (Sample* data, sframes_t frame_pos, nframes_t cnt)
{
if (sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) < 0) {
char errbuf[256];
@@ -572,7 +572,7 @@ SndFileSource::write_float (Sample* data, nframes_t frame_pos, nframes_t cnt)
return cnt;
}
-nframes_t
+sframes_t
SndFileSource::natural_position() const
{
return _timeline_position;
@@ -605,7 +605,7 @@ SndFileSource::clear_capture_marks ()
}
void
-SndFileSource::mark_capture_start (nframes_t pos)
+SndFileSource::mark_capture_start (sframes_t pos)
{
if (destructive()) {
if (pos < _timeline_position) {
@@ -748,7 +748,7 @@ SndFileSource::crossfade (Sample* data, nframes_t cnt, int fade_in)
return cnt;
}
-nframes_t
+sframes_t
SndFileSource::last_capture_start_frame () const
{
if (destructive()) {