Path: blob/master/thirdparty/linuxbsd_headers/alsa/output.h
9898 views
/**1* \file include/output.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_OUTPUT_H28#define __ALSA_OUTPUT_H2930#ifdef __cplusplus31extern "C" {32#endif3334/**35* \defgroup Output Output Interface36*37* The output functions present an interface similar to the stdio functions38* on top of different underlying output destinations.39*40* Many PCM debugging functions (\c snd_pcm_xxx_dump_xxx) use such an output41* handle to be able to write not only to the screen but also to other42* destinations, e.g. to files or to memory buffers.43*44* \{45*/4647/**48* \brief Internal structure for an output object.49*50* The ALSA library uses a pointer to this structure as a handle to an51* output object. Applications don't access its contents directly.52*/53typedef struct _snd_output snd_output_t;5455/** Output type. */56typedef enum _snd_output_type {57/** Output to a stdio stream. */58SND_OUTPUT_STDIO,59/** Output to a memory buffer. */60SND_OUTPUT_BUFFER61} snd_output_type_t;6263int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode);64int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);65int snd_output_buffer_open(snd_output_t **outputp);66size_t snd_output_buffer_string(snd_output_t *output, char **buf);67int snd_output_close(snd_output_t *output);68int snd_output_printf(snd_output_t *output, const char *format, ...)69#ifndef DOC_HIDDEN70__attribute__ ((format (printf, 2, 3)))71#endif72;73int snd_output_vprintf(snd_output_t *output, const char *format, va_list args);74int snd_output_puts(snd_output_t *output, const char *str);75int snd_output_putc(snd_output_t *output, int c);76int snd_output_flush(snd_output_t *output);7778/** \} */7980#ifdef __cplusplus81}82#endif8384#endif /* __ALSA_OUTPUT_H */85868788