On Sat, Oct 08, 2016 at 08:55:04AM +1100, Tobias Brodel wrote: > > I did have audio running under OSS but it was very picky about > the order in which to connect things, and MIDI support > was nonexistent. A sndio backend would be much better, and > after having a play with it last night it seems to be *loads* > simpler than ALSA/OSS. > > I have been having a couple of very basic issues though. Please > excuse me if I'm overlooking something obvious, but does every > sndio client need to implement the `sio_hdl' and `sio_ops' structs > privately?
it's even simpler: the client needs only to: - open the device by calling sio_open() - set parameters with sio_setpar() to desired parameter - get actual parameters with sio_getpar() - start device with sio_start() - call sio_read() and sio_write() in a loop to record/play blocks - call sio_close() when done. AFAIU, each of these operations is to be implemented as functions prefixed by sndio_, in a new src/s_audio_sndio.c file. I can help for this part. Then, in s_audio.c add the necessary calls to these functions under #ifdef USEAPI_SNDIO. For example see how all the alsa_xxx functions are defined and called. Then, the more obscure part is to teach the autotools to define USEAPI_SNDIO macro, for the new sndio_xxx functions to be compiled and called. HTH