annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/alsa/output.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/output.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_OUTPUT_H
jpayne@69 29 #define __ALSA_OUTPUT_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 Output Output Interface
jpayne@69 37 *
jpayne@69 38 * The output functions present an interface similar to the stdio functions
jpayne@69 39 * on top of different underlying output destinations.
jpayne@69 40 *
jpayne@69 41 * Many PCM debugging functions (\c snd_pcm_xxx_dump_xxx) use such an output
jpayne@69 42 * handle to be able to write not only to the screen but also to other
jpayne@69 43 * destinations, e.g. to files or to 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 output object.
jpayne@69 50 *
jpayne@69 51 * The ALSA library uses a pointer to this structure as a handle to an
jpayne@69 52 * output object. Applications don't access its contents directly.
jpayne@69 53 */
jpayne@69 54 typedef struct _snd_output snd_output_t;
jpayne@69 55
jpayne@69 56 /** Output type. */
jpayne@69 57 typedef enum _snd_output_type {
jpayne@69 58 /** Output to a stdio stream. */
jpayne@69 59 SND_OUTPUT_STDIO,
jpayne@69 60 /** Output to a memory buffer. */
jpayne@69 61 SND_OUTPUT_BUFFER
jpayne@69 62 } snd_output_type_t;
jpayne@69 63
jpayne@69 64 int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode);
jpayne@69 65 int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);
jpayne@69 66 int snd_output_buffer_open(snd_output_t **outputp);
jpayne@69 67 size_t snd_output_buffer_string(snd_output_t *output, char **buf);
jpayne@69 68 int snd_output_close(snd_output_t *output);
jpayne@69 69 int snd_output_printf(snd_output_t *output, const char *format, ...)
jpayne@69 70 #ifndef DOC_HIDDEN
jpayne@69 71 __attribute__ ((format (printf, 2, 3)))
jpayne@69 72 #endif
jpayne@69 73 ;
jpayne@69 74 int snd_output_vprintf(snd_output_t *output, const char *format, va_list args);
jpayne@69 75 int snd_output_puts(snd_output_t *output, const char *str);
jpayne@69 76 int snd_output_putc(snd_output_t *output, int c);
jpayne@69 77 int snd_output_flush(snd_output_t *output);
jpayne@69 78
jpayne@69 79 /** \} */
jpayne@69 80
jpayne@69 81 #ifdef __cplusplus
jpayne@69 82 }
jpayne@69 83 #endif
jpayne@69 84
jpayne@69 85 #endif /* __ALSA_OUTPUT_H */
jpayne@69 86