alsa-lib/include/output.h
2001-09-13 11:38:32 +00:00

69 lines
2.1 KiB
C

/**
* \file <alsa/output.h>
* \brief Application interface library for the ALSA driver
* \author Jaroslav Kysela <perex@suse.cz>
* \author Abramo Bagnara <abramo@alsa-project.org>
* \author Takashi Iwai <tiwai@suse.de>
* \date 1998-2001
*
* Application interface library for the ALSA driver
*
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __ALSA_OUTPUT_H
#define __ALSA_OUTPUT_H
/**
* \defgroup Output Output Interface
* Output Interface
* \{
*/
/** Output handle */
typedef struct _snd_output snd_output_t;
/** Output type */
typedef enum _snd_output_type {
/** Output to a stdio stream */
SND_OUTPUT_STDIO,
/** Output to a memory buffer */
SND_OUTPUT_BUFFER,
} snd_output_type_t;
#ifdef __cplusplus
extern "C" {
#endif
int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode);
int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);
int snd_output_buffer_open(snd_output_t **outputp);
size_t snd_output_buffer_string(snd_output_t *output, char **buf);
int snd_output_close(snd_output_t *output);
int snd_output_printf(snd_output_t *output, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
int snd_output_puts(snd_output_t *output, const char *str);
int snd_output_putc(snd_output_t *output, int c);
int snd_output_flush(snd_output_t *output);
#ifdef __cplusplus
}
#endif
/** \} */
#endif /* __ALSA_OUTPUT_H */