|
Packit |
4a16fb |
/*
|
|
Packit |
4a16fb |
* Rawmidi interface - local header file
|
|
Packit |
4a16fb |
* Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org>
|
|
Packit |
4a16fb |
*
|
|
Packit |
4a16fb |
*
|
|
Packit |
4a16fb |
* This library is free software; you can redistribute it and/or modify
|
|
Packit |
4a16fb |
* it under the terms of the GNU Lesser General Public License as
|
|
Packit |
4a16fb |
* published by the Free Software Foundation; either version 2.1 of
|
|
Packit |
4a16fb |
* the License, or (at your option) any later version.
|
|
Packit |
4a16fb |
*
|
|
Packit |
4a16fb |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
4a16fb |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
4a16fb |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
4a16fb |
* GNU Lesser General Public License for more details.
|
|
Packit |
4a16fb |
*
|
|
Packit |
4a16fb |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
4a16fb |
* License along with this library; if not, write to the Free Software
|
|
Packit |
4a16fb |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
4a16fb |
*
|
|
Packit |
4a16fb |
*/
|
|
Packit |
4a16fb |
|
|
Packit |
4a16fb |
#include <stdio.h>
|
|
Packit |
4a16fb |
#include <stdlib.h>
|
|
Packit |
4a16fb |
#include <limits.h>
|
|
Packit |
4a16fb |
#include "local.h"
|
|
Packit |
4a16fb |
|
|
Packit |
4a16fb |
typedef struct {
|
|
Packit |
4a16fb |
int (*close)(snd_rawmidi_t *rawmidi);
|
|
Packit |
4a16fb |
int (*nonblock)(snd_rawmidi_t *rawmidi, int nonblock);
|
|
Packit |
4a16fb |
int (*info)(snd_rawmidi_t *rawmidi, snd_rawmidi_info_t *info);
|
|
Packit |
4a16fb |
int (*params)(snd_rawmidi_t *rawmidi, snd_rawmidi_params_t *params);
|
|
Packit |
4a16fb |
int (*status)(snd_rawmidi_t *rawmidi, snd_rawmidi_status_t *status);
|
|
Packit |
4a16fb |
int (*drop)(snd_rawmidi_t *rawmidi);
|
|
Packit |
4a16fb |
int (*drain)(snd_rawmidi_t *rawmidi);
|
|
Packit |
4a16fb |
ssize_t (*write)(snd_rawmidi_t *rawmidi, const void *buffer, size_t size);
|
|
Packit |
4a16fb |
ssize_t (*read)(snd_rawmidi_t *rawmidi, void *buffer, size_t size);
|
|
Packit |
4a16fb |
} snd_rawmidi_ops_t;
|
|
Packit |
4a16fb |
|
|
Packit |
4a16fb |
struct _snd_rawmidi {
|
|
Packit |
4a16fb |
void *open_func;
|
|
Packit |
4a16fb |
char *name;
|
|
Packit |
4a16fb |
snd_rawmidi_type_t type;
|
|
Packit |
4a16fb |
snd_rawmidi_stream_t stream;
|
|
Packit |
4a16fb |
int mode;
|
|
Packit |
4a16fb |
int poll_fd;
|
|
Packit |
4a16fb |
const snd_rawmidi_ops_t *ops;
|
|
Packit |
4a16fb |
void *private_data;
|
|
Packit |
4a16fb |
size_t buffer_size;
|
|
Packit |
4a16fb |
size_t avail_min;
|
|
Packit |
4a16fb |
unsigned int no_active_sensing: 1;
|
|
Packit |
4a16fb |
};
|
|
Packit |
4a16fb |
|
|
Packit |
4a16fb |
int snd_rawmidi_hw_open(snd_rawmidi_t **input, snd_rawmidi_t **output,
|
|
Packit |
4a16fb |
const char *name, int card, int device, int subdevice,
|
|
Packit |
4a16fb |
int mode);
|
|
Packit |
4a16fb |
|
|
Packit |
4a16fb |
int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
|
Packit |
4a16fb |
const char *name, snd_seq_t *seq_handle, int port,
|
|
Packit |
4a16fb |
int merge, int mode);
|
|
Packit |
4a16fb |
|
|
Packit |
4a16fb |
#define snd_rawmidi_conf_generic_id(id) _snd_conf_generic_id(id)
|