summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_source.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/midi_source.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/midi_source.cc')
-rw-r--r--libs/ardour/midi_source.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc
index b9f7776df8..bb5179d2bb 100644
--- a/libs/ardour/midi_source.cc
+++ b/libs/ardour/midi_source.cc
@@ -108,9 +108,9 @@ MidiSource::invalidate ()
}
nframes_t
-MidiSource::midi_read (MidiRingBuffer<nframes_t>& dst, nframes_t position,
- nframes_t start, nframes_t cnt,
- nframes_t stamp_offset, nframes_t negative_stamp_offset) const
+MidiSource::midi_read (MidiRingBuffer<nframes_t>& dst, sframes_t position,
+ sframes_t start, nframes_t cnt,
+ sframes_t stamp_offset, sframes_t negative_stamp_offset) const
{
Glib::Mutex::Lock lm (_lock);
@@ -147,7 +147,7 @@ MidiSource::midi_read (MidiRingBuffer<nframes_t>& dst, nframes_t position,
}
nframes_t
-MidiSource::midi_write (MidiRingBuffer<nframes_t>& dst, nframes_t position, nframes_t cnt)
+MidiSource::midi_write (MidiRingBuffer<nframes_t>& dst, sframes_t position, nframes_t cnt)
{
Glib::Mutex::Lock lm (_lock);
return write_unlocked (dst, position, cnt);
@@ -164,7 +164,7 @@ MidiSource::file_changed (string path)
}
void
-MidiSource::mark_streaming_midi_write_started (NoteMode mode, nframes_t start_frame)
+MidiSource::mark_streaming_midi_write_started (NoteMode mode, sframes_t start_frame)
{
set_timeline_position(start_frame);