- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

# /builddir/build/BUILD/alsa-lib-1.1.0/include/seq.h

Go to the documentation of this file.

    00001
    00009 /*
    00010  * Application interface library for the ALSA driver
    00011  *
    00012  *
    00013  *   This library is free software; you can redistribute it and/or modify
    00014  *   it under the terms of the GNU Lesser General Public License as
    00015  *   published by the Free Software Foundation; either version 2.1 of
    00016  *   the License, or (at your option) any later version.
    00017  *
    00018  *   This program is distributed in the hope that it will be useful,
    00019  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00021  *   GNU Lesser General Public License for more details.
    00022  *
    00023  *   You should have received a copy of the GNU Lesser General Public
    00024  *   License along with this library; if not, write to the Free Software
    00025  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    00026  *
    00027  */
    00028
    00029 #ifndef __ALSA_SEQ_H
    00030 #define __ALSA_SEQ_H
    00031
    00032 #ifdef __cplusplus
    00033 extern "C" {
    00034 #endif
    00035
    00044 #define SND_SEQ_DLSYM_VERSION           _dlsym_seq_001
    00045
    00047 typedef struct _snd_seq snd_seq_t;
    00048
    00052 #define SND_SEQ_OPEN_OUTPUT     1
    00053 #define SND_SEQ_OPEN_INPUT      2
    00054 #define SND_SEQ_OPEN_DUPLEX     (SND_SEQ_OPEN_OUTPUT|SND_SEQ_OPEN_INPUT)
    00059 #define SND_SEQ_NONBLOCK        0x0001
    00062 typedef enum _snd_seq_type {
    00063         SND_SEQ_TYPE_HW,
    00064         SND_SEQ_TYPE_SHM,
    00065         SND_SEQ_TYPE_INET
    00066 } snd_seq_type_t;
    00067
    00069 #define SND_SEQ_ADDRESS_UNKNOWN         253
    00070 #define SND_SEQ_ADDRESS_SUBSCRIBERS     254
    00071 #define SND_SEQ_ADDRESS_BROADCAST       255
    00074 #define SND_SEQ_CLIENT_SYSTEM           0
    00076 /*
    00077  */
    00078 int snd_seq_open(snd_seq_t **handle, const char *name, int streams, int mode);
    00079 int snd_seq_open_lconf(snd_seq_t **handle, const char *name, int streams, int mode, snd_config_t *lconf);
    00080 const char *snd_seq_name(snd_seq_t *seq);
    00081 snd_seq_type_t snd_seq_type(snd_seq_t *seq);
    00082 int snd_seq_close(snd_seq_t *handle);
    00083 int snd_seq_poll_descriptors_count(snd_seq_t *handle, short events);
    00084 int snd_seq_poll_descriptors(snd_seq_t *handle, struct pollfd *pfds, unsigned int space, short events);
    00085 int snd_seq_poll_descriptors_revents(snd_seq_t *seq, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
    00086 int snd_seq_nonblock(snd_seq_t *handle, int nonblock);
    00087 int snd_seq_client_id(snd_seq_t *handle);
    00088
    00089 size_t snd_seq_get_output_buffer_size(snd_seq_t *handle);
    00090 size_t snd_seq_get_input_buffer_size(snd_seq_t *handle);
    00091 int snd_seq_set_output_buffer_size(snd_seq_t *handle, size_t size);
    00092 int snd_seq_set_input_buffer_size(snd_seq_t *handle, size_t size);
    00093
    00095 typedef struct _snd_seq_system_info snd_seq_system_info_t;
    00096
    00097 size_t snd_seq_system_info_sizeof(void);
    00099 #define snd_seq_system_info_alloca(ptr) \
    00100         __snd_alloca(ptr, snd_seq_system_info)
    00101 int snd_seq_system_info_malloc(snd_seq_system_info_t **ptr);
    00102 void snd_seq_system_info_free(snd_seq_system_info_t *ptr);
    00103 void snd_seq_system_info_copy(snd_seq_system_info_t *dst, const snd_seq_system_info_t *src);
    00104
    00105 int snd_seq_system_info_get_queues(const snd_seq_system_info_t *info);
    00106 int snd_seq_system_info_get_clients(const snd_seq_system_info_t *info);
    00107 int snd_seq_system_info_get_ports(const snd_seq_system_info_t *info);
    00108 int snd_seq_system_info_get_channels(const snd_seq_system_info_t *info);
    00109 int snd_seq_system_info_get_cur_clients(const snd_seq_system_info_t *info);
    00110 int snd_seq_system_info_get_cur_queues(const snd_seq_system_info_t *info);
    00111
    00112 int snd_seq_system_info(snd_seq_t *handle, snd_seq_system_info_t *info);
    00113
    00125 typedef struct _snd_seq_client_info snd_seq_client_info_t;
    00126
    00128 typedef enum snd_seq_client_type {
    00129         SND_SEQ_USER_CLIENT     = 1,
    00130         SND_SEQ_KERNEL_CLIENT   = 2
    00131 } snd_seq_client_type_t;
    00132
    00133 size_t snd_seq_client_info_sizeof(void);
    00135 #define snd_seq_client_info_alloca(ptr) \
    00136         __snd_alloca(ptr, snd_seq_client_info)
    00137 int snd_seq_client_info_malloc(snd_seq_client_info_t **ptr);
    00138 void snd_seq_client_info_free(snd_seq_client_info_t *ptr);
    00139 void snd_seq_client_info_copy(snd_seq_client_info_t *dst, const snd_seq_client_info_t *src);
    00140
    00141 int snd_seq_client_info_get_client(const snd_seq_client_info_t *info);
    00142 snd_seq_client_type_t snd_seq_client_info_get_type(const snd_seq_client_info_t *info);
    00143 const char *snd_seq_client_info_get_name(snd_seq_client_info_t *info);
    00144 int snd_seq_client_info_get_broadcast_filter(const snd_seq_client_info_t *info);
    00145 int snd_seq_client_info_get_error_bounce(const snd_seq_client_info_t *info);
    00146 const unsigned char *snd_seq_client_info_get_event_filter(const snd_seq_client_info_t *info);
    00147 int snd_seq_client_info_get_num_ports(const snd_seq_client_info_t *info);
    00148 int snd_seq_client_info_get_event_lost(const snd_seq_client_info_t *info);
    00149
    00150 void snd_seq_client_info_set_client(snd_seq_client_info_t *info, int client);
    00151 void snd_seq_client_info_set_name(snd_seq_client_info_t *info, const char *name);
    00152 void snd_seq_client_info_set_broadcast_filter(snd_seq_client_info_t *info, int val);
    00153 void snd_seq_client_info_set_error_bounce(snd_seq_client_info_t *info, int val);
    00154 void snd_seq_client_info_set_event_filter(snd_seq_client_info_t *info, unsigned char *filter);
    00155
    00156 void snd_seq_client_info_event_filter_clear(snd_seq_client_info_t *info);
    00157 void snd_seq_client_info_event_filter_add(snd_seq_client_info_t *info, int event_type);
    00158 void snd_seq_client_info_event_filter_del(snd_seq_client_info_t *info, int event_type);
    00159 int snd_seq_client_info_event_filter_check(snd_seq_client_info_t *info, int event_type);
    00160
    00161 int snd_seq_get_client_info(snd_seq_t *handle, snd_seq_client_info_t *info);
    00162 int snd_seq_get_any_client_info(snd_seq_t *handle, int client, snd_seq_client_info_t *info);
    00163 int snd_seq_set_client_info(snd_seq_t *handle, snd_seq_client_info_t *info);
    00164 int snd_seq_query_next_client(snd_seq_t *handle, snd_seq_client_info_t *info);
    00165
    00166 /*
    00167  */
    00168
    00170 typedef struct _snd_seq_client_pool snd_seq_client_pool_t;
    00171
    00172 size_t snd_seq_client_pool_sizeof(void);
    00174 #define snd_seq_client_pool_alloca(ptr) \
    00175         __snd_alloca(ptr, snd_seq_client_pool)
    00176 int snd_seq_client_pool_malloc(snd_seq_client_pool_t **ptr);
    00177 void snd_seq_client_pool_free(snd_seq_client_pool_t *ptr);
    00178 void snd_seq_client_pool_copy(snd_seq_client_pool_t *dst, const snd_seq_client_pool_t *src);
    00179
    00180 int snd_seq_client_pool_get_client(const snd_seq_client_pool_t *info);
    00181 size_t snd_seq_client_pool_get_output_pool(const snd_seq_client_pool_t *info);
    00182 size_t snd_seq_client_pool_get_input_pool(const snd_seq_client_pool_t *info);
    00183 size_t snd_seq_client_pool_get_output_room(const snd_seq_client_pool_t *info);
    00184 size_t snd_seq_client_pool_get_output_free(const snd_seq_client_pool_t *info);
    00185 size_t snd_seq_client_pool_get_input_free(const snd_seq_client_pool_t *info);
    00186 void snd_seq_client_pool_set_output_pool(snd_seq_client_pool_t *info, size_t size);
    00187 void snd_seq_client_pool_set_input_pool(snd_seq_client_pool_t *info, size_t size);
    00188 void snd_seq_client_pool_set_output_room(snd_seq_client_pool_t *info, size_t size);
    00189
    00190 int snd_seq_get_client_pool(snd_seq_t *handle, snd_seq_client_pool_t *info);
    00191 int snd_seq_set_client_pool(snd_seq_t *handle, snd_seq_client_pool_t *info);
    00192
    00193
    00205 typedef struct _snd_seq_port_info snd_seq_port_info_t;
    00206
    00208 #define SND_SEQ_PORT_SYSTEM_TIMER       0
    00209 #define SND_SEQ_PORT_SYSTEM_ANNOUNCE    1
    00212 #define SND_SEQ_PORT_CAP_READ           (1<<0)
    00213 #define SND_SEQ_PORT_CAP_WRITE          (1<<1)
    00215 #define SND_SEQ_PORT_CAP_SYNC_READ      (1<<2)
    00216 #define SND_SEQ_PORT_CAP_SYNC_WRITE     (1<<3)
    00218 #define SND_SEQ_PORT_CAP_DUPLEX         (1<<4)
    00220 #define SND_SEQ_PORT_CAP_SUBS_READ      (1<<5)
    00221 #define SND_SEQ_PORT_CAP_SUBS_WRITE     (1<<6)
    00222 #define SND_SEQ_PORT_CAP_NO_EXPORT      (1<<7)
    00224 /* port type */
    00225
    00226 #define SND_SEQ_PORT_TYPE_SPECIFIC      (1<<0)
    00227
    00228 #define SND_SEQ_PORT_TYPE_MIDI_GENERIC  (1<<1)
    00229
    00230 #define SND_SEQ_PORT_TYPE_MIDI_GM       (1<<2)
    00231
    00232 #define SND_SEQ_PORT_TYPE_MIDI_GS       (1<<3)
    00233
    00234 #define SND_SEQ_PORT_TYPE_MIDI_XG       (1<<4)
    00235
    00236 #define SND_SEQ_PORT_TYPE_MIDI_MT32     (1<<5)
    00237
    00238 #define SND_SEQ_PORT_TYPE_MIDI_GM2      (1<<6)
    00239
    00241 #define SND_SEQ_PORT_TYPE_SYNTH         (1<<10)
    00242
    00244 #define SND_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11)
    00245
    00247 #define SND_SEQ_PORT_TYPE_SAMPLE        (1<<12)
    00248
    00249 #define SND_SEQ_PORT_TYPE_HARDWARE      (1<<16)
    00250
    00251 #define SND_SEQ_PORT_TYPE_SOFTWARE      (1<<17)
    00252
    00253 #define SND_SEQ_PORT_TYPE_SYNTHESIZER   (1<<18)
    00254
    00256 #define SND_SEQ_PORT_TYPE_PORT          (1<<19)
    00257
    00258 #define SND_SEQ_PORT_TYPE_APPLICATION   (1<<20)
    00259
    00260
    00261 size_t snd_seq_port_info_sizeof(void);
    00263 #define snd_seq_port_info_alloca(ptr) \
    00264         __snd_alloca(ptr, snd_seq_port_info)
    00265 int snd_seq_port_info_malloc(snd_seq_port_info_t **ptr);
    00266 void snd_seq_port_info_free(snd_seq_port_info_t *ptr);
    00267 void snd_seq_port_info_copy(snd_seq_port_info_t *dst, const snd_seq_port_info_t *src);
    00268
    00269 int snd_seq_port_info_get_client(const snd_seq_port_info_t *info);
    00270 int snd_seq_port_info_get_port(const snd_seq_port_info_t *info);
    00271 const snd_seq_addr_t *snd_seq_port_info_get_addr(const snd_seq_port_info_t *info);
    00272 const char *snd_seq_port_info_get_name(const snd_seq_port_info_t *info);
    00273 unsigned int snd_seq_port_info_get_capability(const snd_seq_port_info_t *info);
    00274 unsigned int snd_seq_port_info_get_type(const snd_seq_port_info_t *info);
    00275 int snd_seq_port_info_get_midi_channels(const snd_seq_port_info_t *info);
    00276 int snd_seq_port_info_get_midi_voices(const snd_seq_port_info_t *info);
    00277 int snd_seq_port_info_get_synth_voices(const snd_seq_port_info_t *info);
    00278 int snd_seq_port_info_get_read_use(const snd_seq_port_info_t *info);
    00279 int snd_seq_port_info_get_write_use(const snd_seq_port_info_t *info);
    00280 int snd_seq_port_info_get_port_specified(const snd_seq_port_info_t *info);
    00281 int snd_seq_port_info_get_timestamping(const snd_seq_port_info_t *info);
    00282 int snd_seq_port_info_get_timestamp_real(const snd_seq_port_info_t *info);
    00283 int snd_seq_port_info_get_timestamp_queue(const snd_seq_port_info_t *info);
    00284
    00285 void snd_seq_port_info_set_client(snd_seq_port_info_t *info, int client);
    00286 void snd_seq_port_info_set_port(snd_seq_port_info_t *info, int port);
    00287 void snd_seq_port_info_set_addr(snd_seq_port_info_t *info, const snd_seq_addr_t *addr);
    00288 void snd_seq_port_info_set_name(snd_seq_port_info_t *info, const char *name);
    00289 void snd_seq_port_info_set_capability(snd_seq_port_info_t *info, unsigned int capability);
    00290 void snd_seq_port_info_set_type(snd_seq_port_info_t *info, unsigned int type);
    00291 void snd_seq_port_info_set_midi_channels(snd_seq_port_info_t *info, int channels);
    00292 void snd_seq_port_info_set_midi_voices(snd_seq_port_info_t *info, int voices);
    00293 void snd_seq_port_info_set_synth_voices(snd_seq_port_info_t *info, int voices);
    00294 void snd_seq_port_info_set_port_specified(snd_seq_port_info_t *info, int val);
    00295 void snd_seq_port_info_set_timestamping(snd_seq_port_info_t *info, int enable);
    00296 void snd_seq_port_info_set_timestamp_real(snd_seq_port_info_t *info, int realtime);
    00297 void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue);
    00298
    00299 int snd_seq_create_port(snd_seq_t *handle, snd_seq_port_info_t *info);
    00300 int snd_seq_delete_port(snd_seq_t *handle, int port);
    00301 int snd_seq_get_port_info(snd_seq_t *handle, int port, snd_seq_port_info_t *info);
    00302 int snd_seq_get_any_port_info(snd_seq_t *handle, int client, int port, snd_seq_port_info_t *info);
    00303 int snd_seq_set_port_info(snd_seq_t *handle, int port, snd_seq_port_info_t *info);
    00304 int snd_seq_query_next_port(snd_seq_t *handle, snd_seq_port_info_t *info);
    00305
    00317 typedef struct _snd_seq_port_subscribe snd_seq_port_subscribe_t;
    00318
    00319 size_t snd_seq_port_subscribe_sizeof(void);
    00321 #define snd_seq_port_subscribe_alloca(ptr) \
    00322         __snd_alloca(ptr, snd_seq_port_subscribe)
    00323 int snd_seq_port_subscribe_malloc(snd_seq_port_subscribe_t **ptr);
    00324 void snd_seq_port_subscribe_free(snd_seq_port_subscribe_t *ptr);
    00325 void snd_seq_port_subscribe_copy(snd_seq_port_subscribe_t *dst, const snd_seq_port_subscribe_t *src);
    00326
    00327 const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const snd_seq_port_subscribe_t *info);
    00328 const snd_seq_addr_t *snd_seq_port_subscribe_get_dest(const snd_seq_port_subscribe_t *info);
    00329 int snd_seq_port_subscribe_get_queue(const snd_seq_port_subscribe_t *info);
    00330 int snd_seq_port_subscribe_get_exclusive(const snd_seq_port_subscribe_t *info);
    00331 int snd_seq_port_subscribe_get_time_update(const snd_seq_port_subscribe_t *info);
    00332 int snd_seq_port_subscribe_get_time_real(const snd_seq_port_subscribe_t *info);
    00333
    00334 void snd_seq_port_subscribe_set_sender(snd_seq_port_subscribe_t *info, const snd_seq_addr_t *addr);
    00335 void snd_seq_port_subscribe_set_dest(snd_seq_port_subscribe_t *info, const snd_seq_addr_t *addr);
    00336 void snd_seq_port_subscribe_set_queue(snd_seq_port_subscribe_t *info, int q);
    00337 void snd_seq_port_subscribe_set_exclusive(snd_seq_port_subscribe_t *info, int val);
    00338 void snd_seq_port_subscribe_set_time_update(snd_seq_port_subscribe_t *info, int val);
    00339 void snd_seq_port_subscribe_set_time_real(snd_seq_port_subscribe_t *info, int val);
    00340
    00341 int snd_seq_get_port_subscription(snd_seq_t *handle, snd_seq_port_subscribe_t *sub);
    00342 int snd_seq_subscribe_port(snd_seq_t *handle, snd_seq_port_subscribe_t *sub);
    00343 int snd_seq_unsubscribe_port(snd_seq_t *handle, snd_seq_port_subscribe_t *sub);
    00344
    00345 /*
    00346  */
    00347
    00349 typedef struct _snd_seq_query_subscribe snd_seq_query_subscribe_t;
    00350
    00352 typedef enum {
    00353         SND_SEQ_QUERY_SUBS_READ,
    00354         SND_SEQ_QUERY_SUBS_WRITE
    00355 } snd_seq_query_subs_type_t;
    00356
    00357 size_t snd_seq_query_subscribe_sizeof(void);
    00359 #define snd_seq_query_subscribe_alloca(ptr) \
    00360         __snd_alloca(ptr, snd_seq_query_subscribe)
    00361 int snd_seq_query_subscribe_malloc(snd_seq_query_subscribe_t **ptr);
    00362 void snd_seq_query_subscribe_free(snd_seq_query_subscribe_t *ptr);
    00363 void snd_seq_query_subscribe_copy(snd_seq_query_subscribe_t *dst, const snd_seq_query_subscribe_t *src);
    00364
    00365 int snd_seq_query_subscribe_get_client(const snd_seq_query_subscribe_t *info);
    00366 int snd_seq_query_subscribe_get_port(const snd_seq_query_subscribe_t *info);
    00367 const snd_seq_addr_t *snd_seq_query_subscribe_get_root(const snd_seq_query_subscribe_t *info);
    00368 snd_seq_query_subs_type_t snd_seq_query_subscribe_get_type(const snd_seq_query_subscribe_t *info);
    00369 int snd_seq_query_subscribe_get_index(const snd_seq_query_subscribe_t *info);
    00370 int snd_seq_query_subscribe_get_num_subs(const snd_seq_query_subscribe_t *info);
    00371 const snd_seq_addr_t *snd_seq_query_subscribe_get_addr(const snd_seq_query_subscribe_t *info);
    00372 int snd_seq_query_subscribe_get_queue(const snd_seq_query_subscribe_t *info);
    00373 int snd_seq_query_subscribe_get_exclusive(const snd_seq_query_subscribe_t *info);
    00374 int snd_seq_query_subscribe_get_time_update(const snd_seq_query_subscribe_t *info);
    00375 int snd_seq_query_subscribe_get_time_real(const snd_seq_query_subscribe_t *info);
    00376
    00377 void snd_seq_query_subscribe_set_client(snd_seq_query_subscribe_t *info, int client);
    00378 void snd_seq_query_subscribe_set_port(snd_seq_query_subscribe_t *info, int port);
    00379 void snd_seq_query_subscribe_set_root(snd_seq_query_subscribe_t *info, const snd_seq_addr_t *addr);
    00380 void snd_seq_query_subscribe_set_type(snd_seq_query_subscribe_t *info, snd_seq_query_subs_type_t type);
    00381 void snd_seq_query_subscribe_set_index(snd_seq_query_subscribe_t *info, int _index);
    00382
    00383 int snd_seq_query_port_subscribers(snd_seq_t *seq, snd_seq_query_subscribe_t * subs);
    00384
    00396 typedef struct _snd_seq_queue_info snd_seq_queue_info_t;
    00398 typedef struct _snd_seq_queue_status snd_seq_queue_status_t;
    00400 typedef struct _snd_seq_queue_tempo snd_seq_queue_tempo_t;
    00402 typedef struct _snd_seq_queue_timer snd_seq_queue_timer_t;
    00403
    00405 #define SND_SEQ_QUEUE_DIRECT            253
    00407 size_t snd_seq_queue_info_sizeof(void);
    00408
    00409 #define snd_seq_queue_info_alloca(ptr) \
    00410         __snd_alloca(ptr, snd_seq_queue_info)
    00411 int snd_seq_queue_info_malloc(snd_seq_queue_info_t **ptr);
    00412 void snd_seq_queue_info_free(snd_seq_queue_info_t *ptr);
    00413 void snd_seq_queue_info_copy(snd_seq_queue_info_t *dst, const snd_seq_queue_info_t *src);
    00414
    00415 int snd_seq_queue_info_get_queue(const snd_seq_queue_info_t *info);
    00416 const char *snd_seq_queue_info_get_name(const snd_seq_queue_info_t *info);
    00417 int snd_seq_queue_info_get_owner(const snd_seq_queue_info_t *info);
    00418 int snd_seq_queue_info_get_locked(const snd_seq_queue_info_t *info);
    00419 unsigned int snd_seq_queue_info_get_flags(const snd_seq_queue_info_t *info);
    00420
    00421 void snd_seq_queue_info_set_name(snd_seq_queue_info_t *info, const char *name);
    00422 void snd_seq_queue_info_set_owner(snd_seq_queue_info_t *info, int owner);
    00423 void snd_seq_queue_info_set_locked(snd_seq_queue_info_t *info, int locked);
    00424 void snd_seq_queue_info_set_flags(snd_seq_queue_info_t *info, unsigned int flags);
    00425
    00426 int snd_seq_create_queue(snd_seq_t *seq, snd_seq_queue_info_t *info);
    00427 int snd_seq_alloc_named_queue(snd_seq_t *seq, const char *name);
    00428 int snd_seq_alloc_queue(snd_seq_t *handle);
    00429 int snd_seq_free_queue(snd_seq_t *handle, int q);
    00430 int snd_seq_get_queue_info(snd_seq_t *seq, int q, snd_seq_queue_info_t *info);
    00431 int snd_seq_set_queue_info(snd_seq_t *seq, int q, snd_seq_queue_info_t *info);
    00432 int snd_seq_query_named_queue(snd_seq_t *seq, const char *name);
    00433
    00434 int snd_seq_get_queue_usage(snd_seq_t *handle, int q);
    00435 int snd_seq_set_queue_usage(snd_seq_t *handle, int q, int used);
    00436
    00437 /*
    00438  */
    00439 size_t snd_seq_queue_status_sizeof(void);
    00441 #define snd_seq_queue_status_alloca(ptr) \
    00442         __snd_alloca(ptr, snd_seq_queue_status)
    00443 int snd_seq_queue_status_malloc(snd_seq_queue_status_t **ptr);
    00444 void snd_seq_queue_status_free(snd_seq_queue_status_t *ptr);
    00445 void snd_seq_queue_status_copy(snd_seq_queue_status_t *dst, const snd_seq_queue_status_t *src);
    00446
    00447 int snd_seq_queue_status_get_queue(const snd_seq_queue_status_t *info);
    00448 int snd_seq_queue_status_get_events(const snd_seq_queue_status_t *info);
    00449 snd_seq_tick_time_t snd_seq_queue_status_get_tick_time(const snd_seq_queue_status_t *info);
    00450 const snd_seq_real_time_t *snd_seq_queue_status_get_real_time(const snd_seq_queue_status_t *info);
    00451 unsigned int snd_seq_queue_status_get_status(const snd_seq_queue_status_t *info);
    00452
    00453 int snd_seq_get_queue_status(snd_seq_t *handle, int q, snd_seq_queue_status_t *status);
    00454
    00455 /*
    00456  */
    00457 size_t snd_seq_queue_tempo_sizeof(void);
    00459 #define snd_seq_queue_tempo_alloca(ptr) \
    00460         __snd_alloca(ptr, snd_seq_queue_tempo)
    00461 int snd_seq_queue_tempo_malloc(snd_seq_queue_tempo_t **ptr);
    00462 void snd_seq_queue_tempo_free(snd_seq_queue_tempo_t *ptr);
    00463 void snd_seq_queue_tempo_copy(snd_seq_queue_tempo_t *dst, const snd_seq_queue_tempo_t *src);
    00464
    00465 int snd_seq_queue_tempo_get_queue(const snd_seq_queue_tempo_t *info);
    00466 unsigned int snd_seq_queue_tempo_get_tempo(const snd_seq_queue_tempo_t *info);
    00467 int snd_seq_queue_tempo_get_ppq(const snd_seq_queue_tempo_t *info);
    00468 unsigned int snd_seq_queue_tempo_get_skew(const snd_seq_queue_tempo_t *info);
    00469 unsigned int snd_seq_queue_tempo_get_skew_base(const snd_seq_queue_tempo_t *info);
    00470 void snd_seq_queue_tempo_set_tempo(snd_seq_queue_tempo_t *info, unsigned int tempo);
    00471 void snd_seq_queue_tempo_set_ppq(snd_seq_queue_tempo_t *info, int ppq);
    00472 void snd_seq_queue_tempo_set_skew(snd_seq_queue_tempo_t *info, unsigned int skew);
    00473 void snd_seq_queue_tempo_set_skew_base(snd_seq_queue_tempo_t *info, unsigned int base);
    00474
    00475 int snd_seq_get_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
    00476 int snd_seq_set_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
    00477
    00478 /*
    00479  */
    00480
    00482 typedef enum {
    00483         SND_SEQ_TIMER_ALSA = 0,         /* ALSA timer */
    00484         SND_SEQ_TIMER_MIDI_CLOCK = 1,   /* Midi Clock (CLOCK event) */
    00485         SND_SEQ_TIMER_MIDI_TICK = 2     /* Midi Timer Tick (TICK event */
    00486 } snd_seq_queue_timer_type_t;
    00487
    00488 size_t snd_seq_queue_timer_sizeof(void);
    00490 #define snd_seq_queue_timer_alloca(ptr) \
    00491         __snd_alloca(ptr, snd_seq_queue_timer)
    00492 int snd_seq_queue_timer_malloc(snd_seq_queue_timer_t **ptr);
    00493 void snd_seq_queue_timer_free(snd_seq_queue_timer_t *ptr);
    00494 void snd_seq_queue_timer_copy(snd_seq_queue_timer_t *dst, const snd_seq_queue_timer_t *src);
    00495
    00496 int snd_seq_queue_timer_get_queue(const snd_seq_queue_timer_t *info);
    00497 snd_seq_queue_timer_type_t snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t *info);
    00498 const snd_timer_id_t *snd_seq_queue_timer_get_id(const snd_seq_queue_timer_t *info);
    00499 unsigned int snd_seq_queue_timer_get_resolution(const snd_seq_queue_timer_t *info);
    00500
    00501 void snd_seq_queue_timer_set_type(snd_seq_queue_timer_t *info, snd_seq_queue_timer_type_t type);
    00502 void snd_seq_queue_timer_set_id(snd_seq_queue_timer_t *info, const snd_timer_id_t *id);
    00503 void snd_seq_queue_timer_set_resolution(snd_seq_queue_timer_t *info, unsigned int resolution);
    00504
    00505 int snd_seq_get_queue_timer(snd_seq_t *handle, int q, snd_seq_queue_timer_t *timer);
    00506 int snd_seq_set_queue_timer(snd_seq_t *handle, int q, snd_seq_queue_timer_t *timer);
    00507
    00517 int snd_seq_free_event(snd_seq_event_t *ev);
    00518 ssize_t snd_seq_event_length(snd_seq_event_t *ev);
    00519 int snd_seq_event_output(snd_seq_t *handle, snd_seq_event_t *ev);
    00520 int snd_seq_event_output_buffer(snd_seq_t *handle, snd_seq_event_t *ev);
    00521 int snd_seq_event_output_direct(snd_seq_t *handle, snd_seq_event_t *ev);
    00522 int snd_seq_event_input(snd_seq_t *handle, snd_seq_event_t **ev);
    00523 int snd_seq_event_input_pending(snd_seq_t *seq, int fetch_sequencer);
    00524 int snd_seq_drain_output(snd_seq_t *handle);
    00525 int snd_seq_event_output_pending(snd_seq_t *seq);
    00526 int snd_seq_extract_output(snd_seq_t *handle, snd_seq_event_t **ev);
    00527 int snd_seq_drop_output(snd_seq_t *handle);
    00528 int snd_seq_drop_output_buffer(snd_seq_t *handle);
    00529 int snd_seq_drop_input(snd_seq_t *handle);
    00530 int snd_seq_drop_input_buffer(snd_seq_t *handle);
    00531
    00533 typedef struct _snd_seq_remove_events snd_seq_remove_events_t;
    00534
    00536 #define SND_SEQ_REMOVE_INPUT            (1<<0)
    00537 #define SND_SEQ_REMOVE_OUTPUT           (1<<1)
    00538 #define SND_SEQ_REMOVE_DEST             (1<<2)
    00539 #define SND_SEQ_REMOVE_DEST_CHANNEL     (1<<3)
    00540 #define SND_SEQ_REMOVE_TIME_BEFORE      (1<<4)
    00541 #define SND_SEQ_REMOVE_TIME_AFTER       (1<<5)
    00542 #define SND_SEQ_REMOVE_TIME_TICK        (1<<6)
    00543 #define SND_SEQ_REMOVE_EVENT_TYPE       (1<<7)
    00544 #define SND_SEQ_REMOVE_IGNORE_OFF       (1<<8)
    00545 #define SND_SEQ_REMOVE_TAG_MATCH        (1<<9)
    00547 size_t snd_seq_remove_events_sizeof(void);
    00548
    00549 #define snd_seq_remove_events_alloca(ptr) \
    00550         __snd_alloca(ptr, snd_seq_remove_events)
    00551 int snd_seq_remove_events_malloc(snd_seq_remove_events_t **ptr);
    00552 void snd_seq_remove_events_free(snd_seq_remove_events_t *ptr);
    00553 void snd_seq_remove_events_copy(snd_seq_remove_events_t *dst, const snd_seq_remove_events_t *src);
    00554
    00555 unsigned int snd_seq_remove_events_get_condition(const snd_seq_remove_events_t *info);
    00556 int snd_seq_remove_events_get_queue(const snd_seq_remove_events_t *info);
    00557 const snd_seq_timestamp_t *snd_seq_remove_events_get_time(const snd_seq_remove_events_t *info);
    00558 const snd_seq_addr_t *snd_seq_remove_events_get_dest(const snd_seq_remove_events_t *info);
    00559 int snd_seq_remove_events_get_channel(const snd_seq_remove_events_t *info);
    00560 int snd_seq_remove_events_get_event_type(const snd_seq_remove_events_t *info);
    00561 int snd_seq_remove_events_get_tag(const snd_seq_remove_events_t *info);
    00562
    00563 void snd_seq_remove_events_set_condition(snd_seq_remove_events_t *info, unsigned int flags);
    00564 void snd_seq_remove_events_set_queue(snd_seq_remove_events_t *info, int queue);
    00565 void snd_seq_remove_events_set_time(snd_seq_remove_events_t *info, const snd_seq_timestamp_t *time);
    00566 void snd_seq_remove_events_set_dest(snd_seq_remove_events_t *info, const snd_seq_addr_t *addr);
    00567 void snd_seq_remove_events_set_channel(snd_seq_remove_events_t *info, int channel);
    00568 void snd_seq_remove_events_set_event_type(snd_seq_remove_events_t *info, int type);
    00569 void snd_seq_remove_events_set_tag(snd_seq_remove_events_t *info, int tag);
    00570
    00571 int snd_seq_remove_events(snd_seq_t *handle, snd_seq_remove_events_t *info);
    00572
    00582 void snd_seq_set_bit(int nr, void *array);
    00583 void snd_seq_unset_bit(int nr, void *array);
    00584 int snd_seq_change_bit(int nr, void *array);
    00585 int snd_seq_get_bit(int nr, void *array);
    00586
    00597 /* event type macros */
    00598 enum {
    00599         SND_SEQ_EVFLG_RESULT,
    00600         SND_SEQ_EVFLG_NOTE,
    00601         SND_SEQ_EVFLG_CONTROL,
    00602         SND_SEQ_EVFLG_QUEUE,
    00603         SND_SEQ_EVFLG_SYSTEM,
    00604         SND_SEQ_EVFLG_MESSAGE,
    00605         SND_SEQ_EVFLG_CONNECTION,
    00606         SND_SEQ_EVFLG_SAMPLE,
    00607         SND_SEQ_EVFLG_USERS,
    00608         SND_SEQ_EVFLG_INSTR,
    00609         SND_SEQ_EVFLG_QUOTE,
    00610         SND_SEQ_EVFLG_NONE,
    00611         SND_SEQ_EVFLG_RAW,
    00612         SND_SEQ_EVFLG_FIXED,
    00613         SND_SEQ_EVFLG_VARIABLE,
    00614         SND_SEQ_EVFLG_VARUSR
    00615 };
    00616
    00617 enum {
    00618         SND_SEQ_EVFLG_NOTE_ONEARG,
    00619         SND_SEQ_EVFLG_NOTE_TWOARG
    00620 };
    00621
    00622 enum {
    00623         SND_SEQ_EVFLG_QUEUE_NOARG,
    00624         SND_SEQ_EVFLG_QUEUE_TICK,
    00625         SND_SEQ_EVFLG_QUEUE_TIME,
    00626         SND_SEQ_EVFLG_QUEUE_VALUE
    00627 };
    00628
    00634 extern const unsigned int snd_seq_event_types[];
    00635
    00636 #define _SND_SEQ_TYPE(x)        (1<<(x))
    00637 #define _SND_SEQ_TYPE_OPT(x)    ((x)<<24)
    00640 #define snd_seq_type_check(ev,x) (snd_seq_event_types[(ev)->type] & _SND_SEQ_TYPE(x))
    00641
    00643 #define snd_seq_ev_is_result_type(ev) \
    00644         snd_seq_type_check(ev, SND_SEQ_EVFLG_RESULT)
    00645
    00646 #define snd_seq_ev_is_note_type(ev) \
    00647         snd_seq_type_check(ev, SND_SEQ_EVFLG_NOTE)
    00648
    00649 #define snd_seq_ev_is_control_type(ev) \
    00650         snd_seq_type_check(ev, SND_SEQ_EVFLG_CONTROL)
    00651
    00652 #define snd_seq_ev_is_channel_type(ev) \
    00653         (snd_seq_event_types[(ev)->type] & (_SND_SEQ_TYPE(SND_SEQ_EVFLG_NOTE) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_CONTROL)))
    00654
    00656 #define snd_seq_ev_is_queue_type(ev) \
    00657         snd_seq_type_check(ev, SND_SEQ_EVFLG_QUEUE)
    00658
    00659 #define snd_seq_ev_is_message_type(ev) \
    00660         snd_seq_type_check(ev, SND_SEQ_EVFLG_MESSAGE)
    00661
    00662 #define snd_seq_ev_is_subscribe_type(ev) \
    00663         snd_seq_type_check(ev, SND_SEQ_EVFLG_CONNECTION)
    00664
    00665 #define snd_seq_ev_is_sample_type(ev) \
    00666         snd_seq_type_check(ev, SND_SEQ_EVFLG_SAMPLE)
    00667
    00668 #define snd_seq_ev_is_user_type(ev) \
    00669         snd_seq_type_check(ev, SND_SEQ_EVFLG_USERS)
    00670
    00671 #define snd_seq_ev_is_instr_type(ev) \
    00672         snd_seq_type_check(ev, SND_SEQ_EVFLG_INSTR)
    00673
    00674 #define snd_seq_ev_is_fixed_type(ev) \
    00675         snd_seq_type_check(ev, SND_SEQ_EVFLG_FIXED)
    00676
    00677 #define snd_seq_ev_is_variable_type(ev) \
    00678         snd_seq_type_check(ev, SND_SEQ_EVFLG_VARIABLE)
    00679
    00680 #define snd_seq_ev_is_varusr_type(ev) \
    00681         snd_seq_type_check(ev, SND_SEQ_EVFLG_VARUSR)
    00682
    00683 #define snd_seq_ev_is_reserved(ev) \
    00684         (! snd_seq_event_types[(ev)->type])
    00685
    00690 #define snd_seq_ev_is_prior(ev) \
    00691         (((ev)->flags & SND_SEQ_PRIORITY_MASK) == SND_SEQ_PRIORITY_HIGH)
    00692
    00694 #define snd_seq_ev_length_type(ev) \
    00695         ((ev)->flags & SND_SEQ_EVENT_LENGTH_MASK)
    00696
    00697 #define snd_seq_ev_is_fixed(ev) \
    00698         (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_FIXED)
    00699
    00700 #define snd_seq_ev_is_variable(ev) \
    00701         (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARIABLE)
    00702
    00703 #define snd_seq_ev_is_varusr(ev) \
    00704         (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARUSR)
    00705
    00707 #define snd_seq_ev_timestamp_type(ev) \
    00708         ((ev)->flags & SND_SEQ_TIME_STAMP_MASK)
    00709
    00710 #define snd_seq_ev_is_tick(ev) \
    00711         (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_TICK)
    00712
    00713 #define snd_seq_ev_is_real(ev) \
    00714         (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_REAL)
    00715
    00717 #define snd_seq_ev_timemode_type(ev) \
    00718         ((ev)->flags & SND_SEQ_TIME_MODE_MASK)
    00719
    00720 #define snd_seq_ev_is_abstime(ev) \
    00721         (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_ABS)
    00722
    00723 #define snd_seq_ev_is_reltime(ev) \
    00724         (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_REL)
    00725
    00727 #define snd_seq_ev_is_direct(ev) \
    00728         ((ev)->queue == SND_SEQ_QUEUE_DIRECT)
    00729
    00732 #ifdef __cplusplus
    00733 }
    00734 #endif
    00735
    00736 #endif /* __ALSA_SEQ_H */
    00737

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines