aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-09-24 21:22:14 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-09-24 21:22:14 +0200
commit6835a0df1cf34be6c6447401115924e77dc5ecef (patch)
treefc051f970207d1421368386b4f54be8e2ed5d882
parent15f0fcfd887375d254571126603d0e9bc7154ab3 (diff)
downloadsynthpod-6835a0df1cf34be6c6447401115924e77dc5ecef.tar.xz
alsa: set high resolution ALSA sequencer timer.
-rw-r--r--VERSION2
-rw-r--r--bin/synthpod_alsa.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index 49d7b892..9a0e8264 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.6133
+0.1.6135
diff --git a/bin/synthpod_alsa.c b/bin/synthpod_alsa.c
index 2ef3c569..63997039 100644
--- a/bin/synthpod_alsa.c
+++ b/bin/synthpod_alsa.c
@@ -721,6 +721,18 @@ _alsa_init(prog_t *handle, const char *id)
handle->queue = snd_seq_alloc_queue(handle->seq);
if(handle->queue < 0)
bin_log_error(bin, "%s: could not allocate queue\n", __func__);
+
+ // set high resolution timer
+ snd_seq_queue_timer_t *qtimer = NULL;
+ snd_seq_queue_timer_alloca(&qtimer);
+ if(qtimer)
+ {
+ snd_seq_get_queue_timer(handle->seq, handle->queue, qtimer);
+ snd_seq_queue_timer_set_resolution(qtimer, UINT_MAX);
+ snd_seq_set_queue_timer(handle->seq, handle->queue, qtimer);
+ }
+
+ // start queue
snd_seq_start_queue(handle->seq, handle->queue, NULL);
// init alsa pcm