13
0

fix wavesbackend midi timing

This commit is contained in:
Robin Gareus 2014-10-09 09:43:53 +02:00
parent 93f816b2fe
commit 4af4938c25

View File

@ -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());
}
}