Blame include/output.h

Packit 4a16fb
/**
Packit 4a16fb
 * \file include/output.h
Packit 4a16fb
 * \brief Application interface library for the ALSA driver
Packit 4a16fb
 * \author Jaroslav Kysela <perex@perex.cz>
Packit 4a16fb
 * \author Abramo Bagnara <abramo@alsa-project.org>
Packit 4a16fb
 * \author Takashi Iwai <tiwai@suse.de>
Packit 4a16fb
 * \date 1998-2001
Packit 4a16fb
 *
Packit 4a16fb
 * Application interface library for the ALSA driver
Packit 4a16fb
 */
Packit 4a16fb
/*
Packit 4a16fb
 *   This library is free software; you can redistribute it and/or modify
Packit 4a16fb
 *   it under the terms of the GNU Lesser General Public License as
Packit 4a16fb
 *   published by the Free Software Foundation; either version 2.1 of
Packit 4a16fb
 *   the License, or (at your option) any later version.
Packit 4a16fb
 *
Packit 4a16fb
 *   This program is distributed in the hope that it will be useful,
Packit 4a16fb
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 4a16fb
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 4a16fb
 *   GNU Lesser General Public License for more details.
Packit 4a16fb
 *
Packit 4a16fb
 *   You should have received a copy of the GNU Lesser General Public
Packit 4a16fb
 *   License along with this library; if not, write to the Free Software
Packit 4a16fb
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 4a16fb
 *
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
#ifndef __ALSA_OUTPUT_H
Packit 4a16fb
#define __ALSA_OUTPUT_H
Packit 4a16fb
Packit 4a16fb
#ifdef __cplusplus
Packit 4a16fb
extern "C" {
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
/**
Packit 4a16fb
 *  \defgroup Output Output Interface
Packit 4a16fb
 *
Packit 4a16fb
 *  The output functions present an interface similar to the stdio functions
Packit 4a16fb
 *  on top of different underlying output destinations.
Packit 4a16fb
 *
Packit 4a16fb
 *  Many PCM debugging functions (\c snd_pcm_xxx_dump_xxx) use such an output
Packit 4a16fb
 *  handle to be able to write not only to the screen but also to other
Packit 4a16fb
 *  destinations, e.g. to files or to memory buffers.
Packit 4a16fb
 *
Packit 4a16fb
 *  \{
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
/**
Packit 4a16fb
 * \brief Internal structure for an output object.
Packit 4a16fb
 *
Packit 4a16fb
 * The ALSA library uses a pointer to this structure as a handle to an
Packit 4a16fb
 * output object. Applications don't access its contents directly.
Packit 4a16fb
 */
Packit 4a16fb
typedef struct _snd_output snd_output_t;
Packit 4a16fb
Packit 4a16fb
/** Output type. */
Packit 4a16fb
typedef enum _snd_output_type {
Packit 4a16fb
	/** Output to a stdio stream. */
Packit 4a16fb
	SND_OUTPUT_STDIO,
Packit 4a16fb
	/** Output to a memory buffer. */
Packit 4a16fb
	SND_OUTPUT_BUFFER
Packit 4a16fb
} snd_output_type_t;
Packit 4a16fb
Packit 4a16fb
int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode);
Packit 4a16fb
int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);
Packit 4a16fb
int snd_output_buffer_open(snd_output_t **outputp);
Packit 4a16fb
size_t snd_output_buffer_string(snd_output_t *output, char **buf);
Packit 4a16fb
int snd_output_close(snd_output_t *output);
Packit 4a16fb
int snd_output_printf(snd_output_t *output, const char *format, ...)
Packit 4a16fb
#ifndef DOC_HIDDEN
Packit 4a16fb
	__attribute__ ((format (printf, 2, 3)))
Packit 4a16fb
#endif
Packit 4a16fb
	;
Packit 4a16fb
int snd_output_vprintf(snd_output_t *output, const char *format, va_list args);
Packit 4a16fb
int snd_output_puts(snd_output_t *output, const char *str);
Packit 4a16fb
int snd_output_putc(snd_output_t *output, int c);
Packit 4a16fb
int snd_output_flush(snd_output_t *output);
Packit 4a16fb
Packit 4a16fb
/** \} */
Packit 4a16fb
Packit 4a16fb
#ifdef __cplusplus
Packit 4a16fb
}
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
#endif /* __ALSA_OUTPUT_H */
Packit 4a16fb