diff options
author | Robin Gareus <robin@gareus.org> | 2014-10-09 09:43:53 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-10-09 09:43:53 +0200 |
commit | 4af4938c25b35080b2e5e71643d69fcf21d1eedd (patch) | |
tree | 628e3c0bd6ad200f7d209f96bd5cb11a156373c8 /libs | |
parent | 93f816b2fed3f03ead7af8247332fee920992140 (diff) |
fix wavesbackend midi timing
Diffstat (limited to 'libs')
-rw-r--r-- | libs/backends/wavesaudio/waves_midiport.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/backends/wavesaudio/waves_midiport.cc b/libs/backends/wavesaudio/waves_midiport.cc index f071eda17c..aac5be06ed 100644 --- a/libs/backends/wavesaudio/waves_midiport.cc +++ b/libs/backends/wavesaudio/waves_midiport.cc @@ -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()); } } |