annotate plugin/api/alsa/seq.h @ 1482:c014839f49c7 plugin-path-config

Record path associated with first helper found for a plugin, not last (so native helper in preference to 32-bit helper). Also more debug output
author Chris Cannam
date Mon, 11 Jun 2018 11:34:11 +0100
parents 48e9f538e6e9
children
rev   line source
Chris@0 1 /* DSSI ALSA compatibility library
Chris@0 2 *
Chris@0 3 * This library provides for Mac OS X the ALSA snd_seq_event_t handling
Chris@0 4 * necessary to compile and run DSSI. It was extracted from alsa-lib 1.0.8.
Chris@0 5 */
Chris@0 6
Chris@0 7 /**
Chris@0 8 * \file <alsa/seq.h>
Chris@0 9 * \brief Application interface library for the ALSA driver
Chris@0 10 * \author Jaroslav Kysela <perex@suse.cz>
Chris@0 11 * \author Abramo Bagnara <abramo@alsa-project.org>
Chris@0 12 * \author Takashi Iwai <tiwai@suse.de>
Chris@0 13 * \date 1998-2001
Chris@0 14 */
Chris@0 15 /*
Chris@0 16 * Application interface library for the ALSA driver
Chris@0 17 *
Chris@0 18 *
Chris@0 19 * This library is free software; you can redistribute it and/or modify
Chris@0 20 * it under the terms of the GNU Lesser General Public License as
Chris@0 21 * published by the Free Software Foundation; either version 2.1 of
Chris@0 22 * the License, or (at your option) any later version.
Chris@0 23 *
Chris@0 24 * This program is distributed in the hope that it will be useful,
Chris@0 25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@0 26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@0 27 * GNU Lesser General Public License for more details.
Chris@0 28 *
Chris@0 29 * You should have received a copy of the GNU Lesser General Public
Chris@0 30 * License along with this library; if not, write to the Free Software
Chris@0 31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Chris@0 32 *
Chris@0 33 */
Chris@0 34
Chris@0 35 #ifndef __ALSA_SEQ_H
Chris@0 36 #define __ALSA_SEQ_H
Chris@0 37
Chris@0 38 #ifdef __cplusplus
Chris@0 39 extern "C" {
Chris@0 40 #endif
Chris@0 41
Chris@0 42 /**
Chris@0 43 * \defgroup SeqEvType Sequencer Event Type Checks
Chris@0 44 * Sequencer Event Type Checks
Chris@0 45 * \ingroup Sequencer
Chris@0 46 * \{
Chris@0 47 */
Chris@0 48
Chris@0 49 /* event type macros */
Chris@0 50 enum {
Chris@1429 51 SND_SEQ_EVFLG_RESULT,
Chris@1429 52 SND_SEQ_EVFLG_NOTE,
Chris@1429 53 SND_SEQ_EVFLG_CONTROL,
Chris@1429 54 SND_SEQ_EVFLG_QUEUE,
Chris@1429 55 SND_SEQ_EVFLG_SYSTEM,
Chris@1429 56 SND_SEQ_EVFLG_MESSAGE,
Chris@1429 57 SND_SEQ_EVFLG_CONNECTION,
Chris@1429 58 SND_SEQ_EVFLG_SAMPLE,
Chris@1429 59 SND_SEQ_EVFLG_USERS,
Chris@1429 60 SND_SEQ_EVFLG_INSTR,
Chris@1429 61 SND_SEQ_EVFLG_QUOTE,
Chris@1429 62 SND_SEQ_EVFLG_NONE,
Chris@1429 63 SND_SEQ_EVFLG_RAW,
Chris@1429 64 SND_SEQ_EVFLG_FIXED,
Chris@1429 65 SND_SEQ_EVFLG_VARIABLE,
Chris@1429 66 SND_SEQ_EVFLG_VARUSR
Chris@0 67 };
Chris@0 68
Chris@0 69 enum {
Chris@1429 70 SND_SEQ_EVFLG_NOTE_ONEARG,
Chris@1429 71 SND_SEQ_EVFLG_NOTE_TWOARG
Chris@0 72 };
Chris@0 73
Chris@0 74 enum {
Chris@1429 75 SND_SEQ_EVFLG_QUEUE_NOARG,
Chris@1429 76 SND_SEQ_EVFLG_QUEUE_TICK,
Chris@1429 77 SND_SEQ_EVFLG_QUEUE_TIME,
Chris@1429 78 SND_SEQ_EVFLG_QUEUE_VALUE
Chris@0 79 };
Chris@0 80
Chris@0 81 /**
Chris@0 82 * Exported event type table
Chris@0 83 *
Chris@0 84 * This table is referred by snd_seq_ev_is_xxx.
Chris@0 85 */
Chris@0 86 extern const unsigned int snd_seq_event_types[];
Chris@0 87
Chris@1429 88 #define _SND_SEQ_TYPE(x) (1<<(x)) /**< master type - 24bit */
Chris@1429 89 #define _SND_SEQ_TYPE_OPT(x) ((x)<<24) /**< optional type - 8bit */
Chris@0 90
Chris@0 91 /** check the event type */
Chris@0 92 #define snd_seq_type_check(ev,x) (snd_seq_event_types[(ev)->type] & _SND_SEQ_TYPE(x))
Chris@0 93
Chris@0 94 /** event type check: result events */
Chris@0 95 #define snd_seq_ev_is_result_type(ev) \
Chris@1429 96 snd_seq_type_check(ev, SND_SEQ_EVFLG_RESULT)
Chris@0 97 /** event type check: note events */
Chris@0 98 #define snd_seq_ev_is_note_type(ev) \
Chris@1429 99 snd_seq_type_check(ev, SND_SEQ_EVFLG_NOTE)
Chris@0 100 /** event type check: control events */
Chris@0 101 #define snd_seq_ev_is_control_type(ev) \
Chris@1429 102 snd_seq_type_check(ev, SND_SEQ_EVFLG_CONTROL)
Chris@0 103 /** event type check: channel specific events */
Chris@0 104 #define snd_seq_ev_is_channel_type(ev) \
Chris@1429 105 (snd_seq_event_types[(ev)->type] & (_SND_SEQ_TYPE(SND_SEQ_EVFLG_NOTE) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_CONTROL)))
Chris@0 106
Chris@0 107 /** event type check: queue control events */
Chris@0 108 #define snd_seq_ev_is_queue_type(ev) \
Chris@1429 109 snd_seq_type_check(ev, SND_SEQ_EVFLG_QUEUE)
Chris@0 110 /** event type check: system status messages */
Chris@0 111 #define snd_seq_ev_is_message_type(ev) \
Chris@1429 112 snd_seq_type_check(ev, SND_SEQ_EVFLG_MESSAGE)
Chris@0 113 /** event type check: system status messages */
Chris@0 114 #define snd_seq_ev_is_subscribe_type(ev) \
Chris@1429 115 snd_seq_type_check(ev, SND_SEQ_EVFLG_CONNECTION)
Chris@0 116 /** event type check: sample messages */
Chris@0 117 #define snd_seq_ev_is_sample_type(ev) \
Chris@1429 118 snd_seq_type_check(ev, SND_SEQ_EVFLG_SAMPLE)
Chris@0 119 /** event type check: user-defined messages */
Chris@0 120 #define snd_seq_ev_is_user_type(ev) \
Chris@1429 121 snd_seq_type_check(ev, SND_SEQ_EVFLG_USERS)
Chris@0 122 /** event type check: instrument layer events */
Chris@0 123 #define snd_seq_ev_is_instr_type(ev) \
Chris@1429 124 snd_seq_type_check(ev, SND_SEQ_EVFLG_INSTR)
Chris@0 125 /** event type check: fixed length events */
Chris@0 126 #define snd_seq_ev_is_fixed_type(ev) \
Chris@1429 127 snd_seq_type_check(ev, SND_SEQ_EVFLG_FIXED)
Chris@0 128 /** event type check: variable length events */
Chris@1429 129 #define snd_seq_ev_is_variable_type(ev) \
Chris@1429 130 snd_seq_type_check(ev, SND_SEQ_EVFLG_VARIABLE)
Chris@0 131 /** event type check: user pointer events */
Chris@0 132 #define snd_seq_ev_is_varusr_type(ev) \
Chris@1429 133 snd_seq_type_check(ev, SND_SEQ_EVFLG_VARUSR)
Chris@0 134 /** event type check: reserved for kernel */
Chris@0 135 #define snd_seq_ev_is_reserved(ev) \
Chris@1429 136 (! snd_seq_event_types[(ev)->type])
Chris@0 137
Chris@0 138 /**
Chris@0 139 * macros to check event flags
Chris@0 140 */
Chris@0 141 /** prior events */
Chris@1429 142 #define snd_seq_ev_is_prior(ev) \
Chris@1429 143 (((ev)->flags & SND_SEQ_PRIORITY_MASK) == SND_SEQ_PRIORITY_HIGH)
Chris@0 144
Chris@0 145 /** get the data length type */
Chris@0 146 #define snd_seq_ev_length_type(ev) \
Chris@1429 147 ((ev)->flags & SND_SEQ_EVENT_LENGTH_MASK)
Chris@0 148 /** fixed length events */
Chris@1429 149 #define snd_seq_ev_is_fixed(ev) \
Chris@1429 150 (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_FIXED)
Chris@0 151 /** variable length events */
Chris@0 152 #define snd_seq_ev_is_variable(ev) \
Chris@1429 153 (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARIABLE)
Chris@0 154 /** variable length on user-space */
Chris@0 155 #define snd_seq_ev_is_varusr(ev) \
Chris@1429 156 (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARUSR)
Chris@0 157
Chris@0 158 /** time-stamp type */
Chris@0 159 #define snd_seq_ev_timestamp_type(ev) \
Chris@1429 160 ((ev)->flags & SND_SEQ_TIME_STAMP_MASK)
Chris@0 161 /** event is in tick time */
Chris@0 162 #define snd_seq_ev_is_tick(ev) \
Chris@1429 163 (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_TICK)
Chris@0 164 /** event is in real-time */
Chris@0 165 #define snd_seq_ev_is_real(ev) \
Chris@1429 166 (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_REAL)
Chris@0 167
Chris@0 168 /** time-mode type */
Chris@0 169 #define snd_seq_ev_timemode_type(ev) \
Chris@1429 170 ((ev)->flags & SND_SEQ_TIME_MODE_MASK)
Chris@0 171 /** scheduled in absolute time */
Chris@0 172 #define snd_seq_ev_is_abstime(ev) \
Chris@1429 173 (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_ABS)
Chris@0 174 /** scheduled in relative time */
Chris@0 175 #define snd_seq_ev_is_reltime(ev) \
Chris@1429 176 (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_REL)
Chris@0 177
Chris@0 178 /** direct dispatched events */
Chris@0 179 #define snd_seq_ev_is_direct(ev) \
Chris@1429 180 ((ev)->queue == SND_SEQ_QUEUE_DIRECT)
Chris@0 181
Chris@0 182 /** \} */
Chris@0 183
Chris@0 184 #ifdef __cplusplus
Chris@0 185 }
Chris@0 186 #endif
Chris@0 187
Chris@0 188 #endif /* __ALSA_SEQ_H */
Chris@0 189