remove more explicit compiler flags by placing them in the compiler flags dictionary
[ardour.git] / libs / backends / wavesaudio / waves_midiport.cc
index cadf36eb2a6515b57e37bde3bc28c74d9cab3134..aac5be06edba91953cb5f14e797ec9b0bd6a0520 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Gorobchenko Dmytro
+    Copyright (C) 2013 Waves Audio Ltd.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -29,6 +29,12 @@ WavesMidiPort::WavesMidiPort (const std::string& port_name, PortFlags flags)
 {       
 }
 
+struct MidiEventSorter {
+       bool operator() (const WavesMidiEvent* a, const WavesMidiEvent* b) {
+               return *a < *b;
+       }
+};
+
 void* 
 WavesMidiPort::get_buffer (pframes_t nframes)
 {
@@ -47,7 +53,7 @@ WavesMidiPort::get_buffer (pframes_t nframes)
                                target += ((const WavesMidiPort*)*cit)->const_buffer ();
                        }while((++cit) != get_connections ().end ());
 
-                       std::sort (target.begin (), target.end ());
+                       std::sort (target.begin (), target.end (), MidiEventSorter());
                }
        }
 
@@ -58,4 +64,4 @@ void
 WavesMidiPort::_wipe_buffer()
 {
        _waves_midi_buffer.clear ();
-}
\ No newline at end of file
+}