annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/alsa/input.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /**
jpayne@69 2 * \file include/input.h
jpayne@69 3 * \brief Application interface library for the ALSA driver
jpayne@69 4 * \author Jaroslav Kysela <perex@perex.cz>
jpayne@69 5 * \author Abramo Bagnara <abramo@alsa-project.org>
jpayne@69 6 * \author Takashi Iwai <tiwai@suse.de>
jpayne@69 7 * \date 1998-2001
jpayne@69 8 *
jpayne@69 9 * Application interface library for the ALSA driver
jpayne@69 10 */
jpayne@69 11 /*
jpayne@69 12 * This library is free software; you can redistribute it and/or modify
jpayne@69 13 * it under the terms of the GNU Lesser General Public License as
jpayne@69 14 * published by the Free Software Foundation; either version 2.1 of
jpayne@69 15 * the License, or (at your option) any later version.
jpayne@69 16 *
jpayne@69 17 * This program is distributed in the hope that it will be useful,
jpayne@69 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jpayne@69 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
jpayne@69 20 * GNU Lesser General Public License for more details.
jpayne@69 21 *
jpayne@69 22 * You should have received a copy of the GNU Lesser General Public
jpayne@69 23 * License along with this library; if not, write to the Free Software
jpayne@69 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
jpayne@69 25 *
jpayne@69 26 */
jpayne@69 27
jpayne@69 28 #ifndef __ALSA_INPUT_H
jpayne@69 29 #define __ALSA_INPUT_H
jpayne@69 30
jpayne@69 31 #ifdef __cplusplus
jpayne@69 32 extern "C" {
jpayne@69 33 #endif
jpayne@69 34
jpayne@69 35 /**
jpayne@69 36 * \defgroup Input Input Interface
jpayne@69 37 *
jpayne@69 38 * The input functions present an interface similar to the stdio functions
jpayne@69 39 * on top of different underlying input sources.
jpayne@69 40 *
jpayne@69 41 * The #snd_config_load function uses such an input handle to be able to
jpayne@69 42 * load configurations not only from standard files but also from other
jpayne@69 43 * sources, e.g. from memory buffers.
jpayne@69 44 *
jpayne@69 45 * \{
jpayne@69 46 */
jpayne@69 47
jpayne@69 48 /**
jpayne@69 49 * \brief Internal structure for an input object.
jpayne@69 50 *
jpayne@69 51 * The ALSA library uses a pointer to this structure as a handle to an
jpayne@69 52 * input object. Applications don't access its contents directly.
jpayne@69 53 */
jpayne@69 54 typedef struct _snd_input snd_input_t;
jpayne@69 55
jpayne@69 56 /** Input type. */
jpayne@69 57 typedef enum _snd_input_type {
jpayne@69 58 /** Input from a stdio stream. */
jpayne@69 59 SND_INPUT_STDIO,
jpayne@69 60 /** Input from a memory buffer. */
jpayne@69 61 SND_INPUT_BUFFER
jpayne@69 62 } snd_input_type_t;
jpayne@69 63
jpayne@69 64 int snd_input_stdio_open(snd_input_t **inputp, const char *file, const char *mode);
jpayne@69 65 int snd_input_stdio_attach(snd_input_t **inputp, FILE *fp, int _close);
jpayne@69 66 int snd_input_buffer_open(snd_input_t **inputp, const char *buffer, ssize_t size);
jpayne@69 67 int snd_input_close(snd_input_t *input);
jpayne@69 68 int snd_input_scanf(snd_input_t *input, const char *format, ...)
jpayne@69 69 #ifndef DOC_HIDDEN
jpayne@69 70 __attribute__ ((format (scanf, 2, 3)))
jpayne@69 71 #endif
jpayne@69 72 ;
jpayne@69 73 char *snd_input_gets(snd_input_t *input, char *str, size_t size);
jpayne@69 74 int snd_input_getc(snd_input_t *input);
jpayne@69 75 int snd_input_ungetc(snd_input_t *input, int c);
jpayne@69 76
jpayne@69 77 /** \} */
jpayne@69 78
jpayne@69 79 #ifdef __cplusplus
jpayne@69 80 }
jpayne@69 81 #endif
jpayne@69 82
jpayne@69 83 #endif /* __ALSA_INPUT_H */