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