summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/AlsaMidiDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/AlsaMidiDriver.cpp')
-rw-r--r--src/libs/engine/AlsaMidiDriver.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libs/engine/AlsaMidiDriver.cpp b/src/libs/engine/AlsaMidiDriver.cpp
index 78d032be..3f6b060d 100644
--- a/src/libs/engine/AlsaMidiDriver.cpp
+++ b/src/libs/engine/AlsaMidiDriver.cpp
@@ -118,7 +118,7 @@ void
AlsaMidiPort::event(snd_seq_event_t* const ev)
{
// Abuse the tick field to hold the timestamp
- ev->time.tick = _driver->clock()->time_stamp();
+ ev->time.tick = _driver->audio_driver()->frame_time();
// Fix noteons with velocity 0 (required for DSSI spec)
if (ev->type == SND_SEQ_EVENT_NOTEON && ev->data.note.velocity == 0)
@@ -187,8 +187,9 @@ AlsaMidiPort::prepare_block(const SampleCount block_start, const SampleCount blo
bool AlsaMidiDriver::_midi_thread_exit_flag = true;
-AlsaMidiDriver::AlsaMidiDriver()
-: _seq_handle(NULL),
+AlsaMidiDriver::AlsaMidiDriver(AudioDriver* audio_driver)
+: _audio_driver(audio_driver),
+ _seq_handle(NULL),
_event_coder(NULL),
_is_activated(false)
{