summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/smf_source.h
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/ardour/smf_source.h
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/ardour/smf_source.h')
-rw-r--r--libs/ardour/ardour/smf_source.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h
index 7942a118af..e61b3f9737 100644
--- a/libs/ardour/ardour/smf_source.h
+++ b/libs/ardour/ardour/smf_source.h
@@ -52,9 +52,9 @@ public:
bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
void append_event_unlocked_beats (const Evoral::Event<double>& ev);
- void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, nframes_t position);
+ void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sframes_t position);
- void mark_streaming_midi_write_started (NoteMode mode, nframes_t start_time);
+ void mark_streaming_midi_write_started (NoteMode mode, sframes_t start_time);
void mark_streaming_write_completed ();
XMLNode& get_state ();
@@ -71,20 +71,20 @@ public:
private:
nframes_t read_unlocked (MidiRingBuffer<nframes_t>& dst,
- nframes_t position,
- nframes_t start,
+ sframes_t position,
+ sframes_t start,
nframes_t cnt,
- nframes_t stamp_offset,
- nframes_t negative_stamp_offset) const;
+ sframes_t stamp_offset,
+ sframes_t negative_stamp_offset) const;
nframes_t write_unlocked (MidiRingBuffer<nframes_t>& src,
- nframes_t position,
+ sframes_t position,
nframes_t cnt);
void set_default_controls_interpolation ();
double _last_ev_time_beats;
- nframes_t _last_ev_time_frames;
+ sframes_t _last_ev_time_frames;
};
}; /* namespace ARDOUR */