add new sigc++2 directory
[ardour.git] / libs / ardour / ardour / midi_source.h
index c83debec3ddbe51f8807ccd1d84f89984da94acc..997f3f9d6948a456c4d8e6ea09027978563e4dba 100644 (file)
@@ -49,9 +49,16 @@ class MidiSource : public Source
        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);
@@ -91,7 +98,7 @@ class MidiSource : public Source
        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;