MidiSource (Session& session, const XMLNode&);
virtual ~MidiSource ();
- virtual nframes_t read (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset) const;
- virtual nframes_t write (MidiRingBuffer& src, nframes_t cnt);
- virtual void append_event_unlocked(const MidiEvent& ev) = 0;
+ /* Stub Readable interface */
+ virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const { return 0; }
+ virtual nframes64_t readable_length() const { return length(); }
+ virtual uint32_t n_channels () const { return 1; }
+
+ // FIXME: integrate this with the Readable::read interface somehow
+ virtual nframes_t midi_read (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const;
+ virtual nframes_t midi_write (MidiRingBuffer& src, nframes_t cnt);
+
+ virtual void append_event_unlocked(EventTimeUnit unit, const MIDI::Event& ev) = 0;
virtual void mark_for_remove() = 0;
virtual void mark_streaming_midi_write_started (NoteMode mode, nframes_t start_time);
virtual int flush_header() = 0;
virtual int flush_footer() = 0;
- virtual nframes_t read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset) const = 0;
+ virtual nframes_t read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const = 0;
virtual nframes_t write_unlocked (MidiRingBuffer& dst, nframes_t cnt) = 0;
mutable Glib::Mutex _lock;