25 #include "libavformat/avformat.h"
37 const char *audio_device)
43 hdl = sio_open(audio_device, is_output ? SIO_PLAY : SIO_REC, 0);
53 par.le = SIO_LE_NATIVE;
61 if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
67 if (par.bits != 16 || par.sig != 1 ||
68 (is_output && (par.pchan != s->
channels)) ||
69 (!is_output && (par.rchan != s->
channels)) ||
77 (is_output ? par.pchan : par.rchan);
88 s->
channels = is_output ? par.pchan : par.rchan;
92 sio_onmove(hdl,
movecb, s);
94 if (!sio_start(hdl)) {
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
int ff_sndio_close(SndioData *s)
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static void movecb(void *addr, int delta)
av_cold int ff_sndio_open(AVFormatContext *s1, int is_output, const char *audio_device)