Path: blob/master/thirdparty/linuxbsd_headers/alsa/input.h
9898 views
/**1* \file include/input.h2* \brief Application interface library for the ALSA driver3* \author Jaroslav Kysela <[email protected]>4* \author Abramo Bagnara <[email protected]>5* \author Takashi Iwai <[email protected]>6* \date 1998-20017*8* Application interface library for the ALSA driver9*/10/*11* This library is free software; you can redistribute it and/or modify12* it under the terms of the GNU Lesser General Public License as13* published by the Free Software Foundation; either version 2.1 of14* the License, or (at your option) any later version.15*16* This program is distributed in the hope that it will be useful,17* but WITHOUT ANY WARRANTY; without even the implied warranty of18* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19* GNU Lesser General Public License for more details.20*21* You should have received a copy of the GNU Lesser General Public22* License along with this library; if not, write to the Free Software23* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA24*25*/2627#ifndef __ALSA_INPUT_H28#define __ALSA_INPUT_H2930#ifdef __cplusplus31extern "C" {32#endif3334/**35* \defgroup Input Input Interface36*37* The input functions present an interface similar to the stdio functions38* on top of different underlying input sources.39*40* The #snd_config_load function uses such an input handle to be able to41* load configurations not only from standard files but also from other42* sources, e.g. from memory buffers.43*44* \{45*/4647/**48* \brief Internal structure for an input object.49*50* The ALSA library uses a pointer to this structure as a handle to an51* input object. Applications don't access its contents directly.52*/53typedef struct _snd_input snd_input_t;5455/** Input type. */56typedef enum _snd_input_type {57/** Input from a stdio stream. */58SND_INPUT_STDIO,59/** Input from a memory buffer. */60SND_INPUT_BUFFER61} snd_input_type_t;6263int snd_input_stdio_open(snd_input_t **inputp, const char *file, const char *mode);64int snd_input_stdio_attach(snd_input_t **inputp, FILE *fp, int _close);65int snd_input_buffer_open(snd_input_t **inputp, const char *buffer, ssize_t size);66int snd_input_close(snd_input_t *input);67int snd_input_scanf(snd_input_t *input, const char *format, ...)68#ifndef DOC_HIDDEN69__attribute__ ((format (scanf, 2, 3)))70#endif71;72char *snd_input_gets(snd_input_t *input, char *str, size_t size);73int snd_input_getc(snd_input_t *input);74int snd_input_ungetc(snd_input_t *input, int c);7576/** \} */7778#ifdef __cplusplus79}80#endif8182#endif /* __ALSA_INPUT_H */838485