allow to get custom/product/version independent cach dir
[ardour.git] / libs / ardour / midi_playlist_source.cc
index 5dfbf955c6cbf047069f39802796a91775f56d0c..8b7e87889e4945605be56f0ae70db0b51f875146 100644 (file)
@@ -25,7 +25,7 @@
 #include "ardour/midi_playlist.h"
 #include "ardour/midi_playlist_source.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -122,10 +122,14 @@ MidiPlaylistSource::length (framepos_t)  const
 }
 
 framecnt_t
-MidiPlaylistSource::read_unlocked (Evoral::EventSink<framepos_t>& dst,
+MidiPlaylistSource::read_unlocked (const Lock& lock,
+                                  Evoral::EventSink<framepos_t>& dst,
                                   framepos_t /*position*/,
-                                  framepos_t start, framecnt_t cnt,
-                                  MidiStateTracker*) const
+                                  framepos_t start,
+                                   framecnt_t cnt,
+                                   Evoral::Range<framepos_t>* loop_range,
+                                  MidiStateTracker*,
+                                  MidiChannelFilter*) const
 {
        boost::shared_ptr<MidiPlaylist> mp = boost::dynamic_pointer_cast<MidiPlaylist> (_playlist);
 
@@ -133,47 +137,48 @@ MidiPlaylistSource::read_unlocked (Evoral::EventSink<framepos_t>& dst,
                return 0;
        }
 
-       return mp->read (dst, start, cnt);
+       return mp->read (dst, start, cnt, loop_range);
 }
 
 framecnt_t
-MidiPlaylistSource::write_unlocked (MidiRingBuffer<framepos_t>&,
-                                   framepos_t,
-                                   framecnt_t)
+MidiPlaylistSource::write_unlocked (const Lock&,
+                                    MidiRingBuffer<framepos_t>&,
+                                    framepos_t,
+                                    framecnt_t)
 {
        fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::write_unlocked() called - should be impossible") << endmsg;
-       /*NOTREACHED*/
+       abort(); /*NOTREACHED*/
        return 0;
 }
 
 void
-MidiPlaylistSource::append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& /*ev*/)
+MidiPlaylistSource::append_event_beats(const Glib::Threads::Mutex::Lock& /*lock*/, const Evoral::Event<Evoral::Beats>& /*ev*/)
 {
-       fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::append_event_unlocked_beats() called - should be impossible") << endmsg;
-       /*NOTREACHED*/
+       fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::append_event_beats() called - should be impossible") << endmsg;
+       abort(); /*NOTREACHED*/
 }
 
 void
-MidiPlaylistSource::append_event_unlocked_frames(const Evoral::Event<framepos_t>& /* ev */, framepos_t /*source_start*/)
+MidiPlaylistSource::append_event_frames(const Glib::Threads::Mutex::Lock& /*lock*/, const Evoral::Event<framepos_t>& /* ev */, framepos_t /*source_start*/)
 {
-       fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::append_event_unlocked_frames() called - should be impossible") << endmsg;
-       /*NOTREACHED*/
+       fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::append_event_frames() called - should be impossible") << endmsg;
+       abort(); /*NOTREACHED*/
 }
 
 void
-MidiPlaylistSource::load_model (bool, bool)
+MidiPlaylistSource::load_model (const Glib::Threads::Mutex::Lock&, bool)
 {
        /* nothing to do */
 }
 
 void
-MidiPlaylistSource::destroy_model ()
+MidiPlaylistSource::destroy_model (const Glib::Threads::Mutex::Lock&)
 {
        /* nothing to do */
 }
 
 void
-MidiPlaylistSource::flush_midi ()
+MidiPlaylistSource::flush_midi (const Lock& lock)
 {
 }