midiUI thread needs tempo-map (#9358)
This fixes handling MMC commands (locate, record) or any async MIDI message that uses timepos_t/timecnt_t.
This commit is contained in:
parent
0006f4d8cd
commit
8bf8e67545
@ -29,6 +29,8 @@
|
||||
|
||||
#include "midi++/types.h"
|
||||
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "ardour/async_midi_port.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/midi_buffer.h"
|
||||
@ -330,6 +332,10 @@ AsyncMIDIPort::read (MIDI::byte *, size_t)
|
||||
uint32_t size;
|
||||
vector<MIDI::byte> buffer(input_fifo.capacity());
|
||||
|
||||
if (!is_process_thread()) {
|
||||
(void) Temporal::TempoMap::fetch();
|
||||
}
|
||||
|
||||
while (input_fifo.read (&time, &type, &size, &buffer[0])) {
|
||||
_parser->set_timestamp (time);
|
||||
for (uint32_t i = 0; i < size; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user