Lines Matching refs:output
38 int (*close)(snd_output_t *output);
39 int (*print)(snd_output_t *output, const char *format, va_list args);
40 int (*puts)(snd_output_t *output, const char *str);
41 int (*putch)(snd_output_t *output, int c);
42 int (*flush)(snd_output_t *output);
57 int snd_output_close(snd_output_t *output) in snd_output_close() argument
59 int err = output->ops->close(output); in snd_output_close()
60 free(output); in snd_output_close()
71 int snd_output_printf(snd_output_t *output, const char *format, ...) in snd_output_printf() argument
76 result = output->ops->print(output, format, args); in snd_output_printf()
88 int snd_output_vprintf(snd_output_t *output, const char *format, va_list args) in snd_output_vprintf() argument
90 return output->ops->print(output, format, args); in snd_output_vprintf()
99 int snd_output_puts(snd_output_t *output, const char *str) in snd_output_puts() argument
101 return output->ops->puts(output, str); in snd_output_puts()
110 int snd_output_putc(snd_output_t *output, int c) in snd_output_putc() argument
112 return output->ops->putch(output, c); in snd_output_putc()
124 int snd_output_flush(snd_output_t *output) in snd_output_flush() argument
126 return output->ops->flush(output); in snd_output_flush()
135 static int snd_output_stdio_close(snd_output_t *output) in snd_output_stdio_close() argument
137 snd_output_stdio_t *stdio = output->private_data; in snd_output_stdio_close()
144 static int snd_output_stdio_print(snd_output_t *output, const char *format, va_list args) in snd_output_stdio_print() argument
146 snd_output_stdio_t *stdio = output->private_data; in snd_output_stdio_print()
150 static int snd_output_stdio_puts(snd_output_t *output, const char *str) in snd_output_stdio_puts() argument
152 snd_output_stdio_t *stdio = output->private_data; in snd_output_stdio_puts()
156 static int snd_output_stdio_putc(snd_output_t *output, int c) in snd_output_stdio_putc() argument
158 snd_output_stdio_t *stdio = output->private_data; in snd_output_stdio_putc()
162 static int snd_output_stdio_flush(snd_output_t *output) in snd_output_stdio_flush() argument
164 snd_output_stdio_t *stdio = output->private_data; in snd_output_stdio_flush()
190 snd_output_t *output; in snd_output_stdio_attach() local
196 output = calloc(1, sizeof(*output)); in snd_output_stdio_attach()
197 if (!output) { in snd_output_stdio_attach()
203 output->type = SND_OUTPUT_STDIO; in snd_output_stdio_attach()
204 output->ops = &snd_output_stdio_ops; in snd_output_stdio_attach()
205 output->private_data = stdio; in snd_output_stdio_attach()
206 *outputp = output; in snd_output_stdio_attach()
240 static int snd_output_buffer_close(snd_output_t *output) in snd_output_buffer_close() argument
242 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_close()
248 static int snd_output_buffer_need(snd_output_t *output, size_t size) in snd_output_buffer_need() argument
250 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_need()
274 static int snd_output_buffer_print(snd_output_t *output, const char *format, va_list args) in snd_output_buffer_print() argument
276 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_print()
279 result = snd_output_buffer_need(output, size); in snd_output_buffer_print()
289 result = snd_output_buffer_need(output, size); in snd_output_buffer_print()
298 static int snd_output_buffer_puts(snd_output_t *output, const char *str) in snd_output_buffer_puts() argument
300 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_puts()
303 err = snd_output_buffer_need(output, size); in snd_output_buffer_puts()
311 static int snd_output_buffer_putc(snd_output_t *output, int c) in snd_output_buffer_putc() argument
313 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_putc()
315 err = snd_output_buffer_need(output, 1); in snd_output_buffer_putc()
322 static int snd_output_buffer_flush(snd_output_t *output ATTRIBUTE_UNUSED) in snd_output_buffer_flush()
324 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_flush()
348 size_t snd_output_buffer_string(snd_output_t *output, char **buf) in snd_output_buffer_string() argument
350 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_string()
365 size_t snd_output_buffer_steal(snd_output_t *output, char **buf) in snd_output_buffer_steal() argument
367 snd_output_buffer_t *buffer = output->private_data; in snd_output_buffer_steal()
385 snd_output_t *output; in snd_output_buffer_open() local
391 output = calloc(1, sizeof(*output)); in snd_output_buffer_open()
392 if (!output) { in snd_output_buffer_open()
399 output->type = SND_OUTPUT_BUFFER; in snd_output_buffer_open()
400 output->ops = &snd_output_buffer_ops; in snd_output_buffer_open()
401 output->private_data = buffer; in snd_output_buffer_open()
402 *outputp = output; in snd_output_buffer_open()