alsa-lib/src/rawmidi/rawmidi_local.h
Jaroslav Kysela 81a7a93636 reshuffle included files to include config.h as first - v2
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Fixes: ad3a8b8b ("reshuffle included files to include config.h as first")
Related: https://github.com/alsa-project/alsa-lib/pull/333
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-13 12:35:35 +02:00

71 lines
2.6 KiB
C

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