ALSA project - the C library reference
Loading...
Searching...
No Matches
output.h
Go to the documentation of this file.
1
11/*
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License as
14 * published by the Free Software Foundation; either version 2.1 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 *
26 */
27
28#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
29/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
30#warning "use #include <alsa/asoundlib.h>, <alsa/input.h> should not be used directly"
31#include <alsa/asoundlib.h>
32#endif
33
34#ifndef __ALSA_OUTPUT_H
35#define __ALSA_OUTPUT_H
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
60typedef struct _snd_output snd_output_t;
61
63typedef enum _snd_output_type {
69
70int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode);
71int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);
73size_t snd_output_buffer_string(snd_output_t *output, char **buf);
74size_t snd_output_buffer_steal(snd_output_t *output, char **buf);
76int snd_output_printf(snd_output_t *output, const char *format, ...)
77#ifndef DOC_HIDDEN
78 __attribute__ ((format (printf, 2, 3)))
79#endif
80 ;
81int snd_output_vprintf(snd_output_t *output, const char *format, va_list args);
82int snd_output_puts(snd_output_t *output, const char *str);
83int snd_output_putc(snd_output_t *output, int c);
85
88#ifdef __cplusplus
89}
90#endif
91
92#endif /* __ALSA_OUTPUT_H */
93
size_t snd_output_buffer_steal(snd_output_t *output, char **buf)
Returns the address of the buffer of a SND_OUTPUT_BUFFER output handle.
Definition output.c:365
struct _snd_output snd_output_t
Internal structure for an output object.
Definition output.h:60
int snd_output_printf(snd_output_t *output, const char *format,...)
Writes formatted output (like fprintf(3)) to an output handle.
Definition output.c:71
snd_output_type_t
Definition output.h:63
int snd_output_putc(snd_output_t *output, int c)
Writes a character to an output handle (like putc(3)).
Definition output.c:110
int snd_output_flush(snd_output_t *output)
Flushes an output handle (like fflush(3)).
Definition output.c:124
int snd_output_puts(snd_output_t *output, const char *str)
Writes a string to an output handle (like fputs(3)).
Definition output.c:99
size_t snd_output_buffer_string(snd_output_t *output, char **buf)
Returns the address of the buffer of a SND_OUTPUT_BUFFER output handle.
Definition output.c:348
int snd_output_close(snd_output_t *output)
Closes an output handle.
Definition output.c:57
int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close)
Creates a new output object using an existing stdio FILE pointer.
Definition output.c:188
int snd_output_vprintf(snd_output_t *output, const char *format, va_list args)
Writes formatted output (like fprintf(3)) to an output handle.
Definition output.c:88
int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode)
Creates a new output object writing to a file.
Definition output.c:218
int snd_output_buffer_open(snd_output_t **outputp)
Creates a new output object with an auto-extending memory buffer.
Definition output.c:383
@ SND_OUTPUT_BUFFER
Definition output.h:67
@ SND_OUTPUT_STDIO
Definition output.h:65
uint16_t format
Definition ump_msg.h:2