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

- File List
- Globals

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

Go to the documentation of this file.

    00001
    00011 /*
    00012  *   This library is free software; you can redistribute it and/or modify
    00013  *   it under the terms of the GNU Lesser General Public License as
    00014  *   published by the Free Software Foundation; either version 2.1 of
    00015  *   the License, or (at your option) any later version.
    00016  *
    00017  *   This program is distributed in the hope that it will be useful,
    00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00020  *   GNU Lesser General Public License for more details.
    00021  *
    00022  *   You should have received a copy of the GNU Lesser General Public
    00023  *   License along with this library; if not, write to the Free Software
    00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    00025  *
    00026  */
    00027
    00028 #ifndef __ALSA_RAWMIDI_H
    00029 #define __ALSA_RAWMIDI_H
    00030
    00031 #ifdef __cplusplus
    00032 extern "C" {
    00033 #endif
    00034
    00042 #define SND_RAWMIDI_DLSYM_VERSION       _dlsym_rawmidi_001
    00043
    00045 typedef struct _snd_rawmidi_info snd_rawmidi_info_t;
    00047 typedef struct _snd_rawmidi_params snd_rawmidi_params_t;
    00049 typedef struct _snd_rawmidi_status snd_rawmidi_status_t;
    00050
    00052 typedef enum _snd_rawmidi_stream {
    00054         SND_RAWMIDI_STREAM_OUTPUT = 0,
    00056         SND_RAWMIDI_STREAM_INPUT,
    00057         SND_RAWMIDI_STREAM_LAST = SND_RAWMIDI_STREAM_INPUT
    00058 } snd_rawmidi_stream_t;
    00059
    00061 #define SND_RAWMIDI_APPEND      0x0001
    00062
    00063 #define SND_RAWMIDI_NONBLOCK    0x0002
    00064
    00065 #define SND_RAWMIDI_SYNC        0x0004
    00066
    00068 typedef struct _snd_rawmidi snd_rawmidi_t;
    00069
    00071 typedef enum _snd_rawmidi_type {
    00073         SND_RAWMIDI_TYPE_HW,
    00075         SND_RAWMIDI_TYPE_SHM,
    00077         SND_RAWMIDI_TYPE_INET,
    00079         SND_RAWMIDI_TYPE_VIRTUAL
    00080 } snd_rawmidi_type_t;
    00081
    00082 int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
    00083                      const char *name, int mode);
    00084 int snd_rawmidi_open_lconf(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
    00085                            const char *name, int mode, snd_config_t *lconf);
    00086 int snd_rawmidi_close(snd_rawmidi_t *rmidi);
    00087 int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t *rmidi);
    00088 int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space);
    00089 int snd_rawmidi_poll_descriptors_revents(snd_rawmidi_t *rawmidi, struct pollfd *pfds, unsigned int nfds, unsigned short *revent);
    00090 int snd_rawmidi_nonblock(snd_rawmidi_t *rmidi, int nonblock);
    00091 size_t snd_rawmidi_info_sizeof(void);
    00096 #define snd_rawmidi_info_alloca(ptr) __snd_alloca(ptr, snd_rawmidi_info)
    00097 int snd_rawmidi_info_malloc(snd_rawmidi_info_t **ptr);
    00098 void snd_rawmidi_info_free(snd_rawmidi_info_t *obj);
    00099 void snd_rawmidi_info_copy(snd_rawmidi_info_t *dst, const snd_rawmidi_info_t *src);
    00100 unsigned int snd_rawmidi_info_get_device(const snd_rawmidi_info_t *obj);
    00101 unsigned int snd_rawmidi_info_get_subdevice(const snd_rawmidi_info_t *obj);
    00102 snd_rawmidi_stream_t snd_rawmidi_info_get_stream(const snd_rawmidi_info_t *obj);
    00103 int snd_rawmidi_info_get_card(const snd_rawmidi_info_t *obj);
    00104 unsigned int snd_rawmidi_info_get_flags(const snd_rawmidi_info_t *obj);
    00105 const char *snd_rawmidi_info_get_id(const snd_rawmidi_info_t *obj);
    00106 const char *snd_rawmidi_info_get_name(const snd_rawmidi_info_t *obj);
    00107 const char *snd_rawmidi_info_get_subdevice_name(const snd_rawmidi_info_t *obj);
    00108 unsigned int snd_rawmidi_info_get_subdevices_count(const snd_rawmidi_info_t *obj);
    00109 unsigned int snd_rawmidi_info_get_subdevices_avail(const snd_rawmidi_info_t *obj);
    00110 void snd_rawmidi_info_set_device(snd_rawmidi_info_t *obj, unsigned int val);
    00111 void snd_rawmidi_info_set_subdevice(snd_rawmidi_info_t *obj, unsigned int val);
    00112 void snd_rawmidi_info_set_stream(snd_rawmidi_info_t *obj, snd_rawmidi_stream_t val);
    00113 int snd_rawmidi_info(snd_rawmidi_t *rmidi, snd_rawmidi_info_t * info);
    00114 size_t snd_rawmidi_params_sizeof(void);
    00119 #define snd_rawmidi_params_alloca(ptr) __snd_alloca(ptr, snd_rawmidi_params)
    00120 int snd_rawmidi_params_malloc(snd_rawmidi_params_t **ptr);
    00121 void snd_rawmidi_params_free(snd_rawmidi_params_t *obj);
    00122 void snd_rawmidi_params_copy(snd_rawmidi_params_t *dst, const snd_rawmidi_params_t *src);
    00123 int snd_rawmidi_params_set_buffer_size(snd_rawmidi_t *rmidi, snd_rawmidi_params_t *params, size_t val);
    00124 size_t snd_rawmidi_params_get_buffer_size(const snd_rawmidi_params_t *params);
    00125 int snd_rawmidi_params_set_avail_min(snd_rawmidi_t *rmidi, snd_rawmidi_params_t *params, size_t val);
    00126 size_t snd_rawmidi_params_get_avail_min(const snd_rawmidi_params_t *params);
    00127 int snd_rawmidi_params_set_no_active_sensing(snd_rawmidi_t *rmidi, snd_rawmidi_params_t *params, int val);
    00128 int snd_rawmidi_params_get_no_active_sensing(const snd_rawmidi_params_t *params);
    00129 int snd_rawmidi_params(snd_rawmidi_t *rmidi, snd_rawmidi_params_t * params);
    00130 int snd_rawmidi_params_current(snd_rawmidi_t *rmidi, snd_rawmidi_params_t *params);
    00131 size_t snd_rawmidi_status_sizeof(void);
    00136 #define snd_rawmidi_status_alloca(ptr) __snd_alloca(ptr, snd_rawmidi_status)
    00137 int snd_rawmidi_status_malloc(snd_rawmidi_status_t **ptr);
    00138 void snd_rawmidi_status_free(snd_rawmidi_status_t *obj);
    00139 void snd_rawmidi_status_copy(snd_rawmidi_status_t *dst, const snd_rawmidi_status_t *src);
    00140 void snd_rawmidi_status_get_tstamp(const snd_rawmidi_status_t *obj, snd_htimestamp_t *ptr);
    00141 size_t snd_rawmidi_status_get_avail(const snd_rawmidi_status_t *obj);
    00142 size_t snd_rawmidi_status_get_xruns(const snd_rawmidi_status_t *obj);
    00143 int snd_rawmidi_status(snd_rawmidi_t *rmidi, snd_rawmidi_status_t * status);
    00144 int snd_rawmidi_drain(snd_rawmidi_t *rmidi);
    00145 int snd_rawmidi_drop(snd_rawmidi_t *rmidi);
    00146 ssize_t snd_rawmidi_write(snd_rawmidi_t *rmidi, const void *buffer, size_t size);
    00147 ssize_t snd_rawmidi_read(snd_rawmidi_t *rmidi, void *buffer, size_t size);
    00148 const char *snd_rawmidi_name(snd_rawmidi_t *rmidi);
    00149 snd_rawmidi_type_t snd_rawmidi_type(snd_rawmidi_t *rmidi);
    00150 snd_rawmidi_stream_t snd_rawmidi_stream(snd_rawmidi_t *rawmidi);
    00151
    00154 #ifdef __cplusplus
    00155 }
    00156 #endif
    00157
    00158 #endif /* __RAWMIDI_H */
    00159

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines