From cd97f4e73547f21d2234d63d9eb9ba5586a31d9d Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 28 Aug 2001 08:03:19 +0000 Subject: [PATCH] Added snd_seq_queue_timer_type_t. --- include/seq.h | 12 ++++++++++-- src/seq/seq.c | 8 ++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/seq.h b/include/seq.h index 60a35f55..96d8a2e1 100644 --- a/include/seq.h +++ b/include/seq.h @@ -415,6 +415,14 @@ int snd_seq_set_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tem /* */ + +/** sequencer timer sources */ +typedef enum { + SND_SEQ_TIMER_ALSA = 0, /* ALSA timer */ + SND_SEQ_TIMER_MIDI_CLOCK = 1, /* Midi Clock (CLOCK event) */ + SND_SEQ_TIMER_MIDI_TICK = 2, /* Midi Timer Tick (TICK event */ +} snd_seq_queue_timer_type_t; + size_t snd_seq_queue_timer_sizeof(void); /** allocate a #snd_seq_queue_timer_t container on stack */ #define snd_seq_queue_timer_alloca(ptr) \ @@ -424,11 +432,11 @@ void snd_seq_queue_timer_free(snd_seq_queue_timer_t *ptr); void snd_seq_queue_timer_copy(snd_seq_queue_timer_t *dst, const snd_seq_queue_timer_t *src); int snd_seq_queue_timer_get_queue(const snd_seq_queue_timer_t *info); -int snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t *info); +snd_seq_queue_timer_type_t snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t *info); const snd_timer_id_t *snd_seq_queue_timer_get_id(const snd_seq_queue_timer_t *info); unsigned int snd_seq_queue_timer_get_resolution(const snd_seq_queue_timer_t *info); -void snd_seq_queue_timer_set_type(snd_seq_queue_timer_t *info, int type); +void snd_seq_queue_timer_set_type(snd_seq_queue_timer_t *info, snd_seq_queue_timer_type_t type); void snd_seq_queue_timer_set_id(snd_seq_queue_timer_t *info, const snd_timer_id_t *id); void snd_seq_queue_timer_set_resolution(snd_seq_queue_timer_t *info, unsigned int resolution); diff --git a/src/seq/seq.c b/src/seq/seq.c index b22d3da9..ddf37c5c 100644 --- a/src/seq/seq.c +++ b/src/seq/seq.c @@ -2329,10 +2329,10 @@ int snd_seq_queue_timer_get_queue(const snd_seq_queue_timer_t *info) * \param info queue_timer container * \return timer type */ -int snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t *info) +snd_seq_queue_timer_type_t snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t *info) { assert(info); - return info->type; + return (snd_seq_queue_timer_type_t)info->type; } /** @@ -2362,10 +2362,10 @@ unsigned int snd_seq_queue_timer_get_resolution(const snd_seq_queue_timer_t *inf * \param info queue_timer container * \param type timer type */ -void snd_seq_queue_timer_set_type(snd_seq_queue_timer_t *info, int type) +void snd_seq_queue_timer_set_type(snd_seq_queue_timer_t *info, snd_seq_queue_timer_type_t type) { assert(info); - info->type = type; + info->type = (int)type; } /**