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)) {
Main libavdevice API header.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ff_sndio_close(SndioData *s)
static void movecb(void *addr, int delta)
av_cold int ff_sndio_open(AVFormatContext *s1, int is_output, const char *audio_device)
void * priv_data
Format private data.