From 798435b1dce227c29f474edce27f7c13a0414da4 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Mon, 27 Mar 2017 14:05:51 +0200 Subject: [PATCH] Tweak RETURN VALUES section. Move description of sio_pollfd() and sio_nfds() return values there and add a paragraph about sio_eof(). From natano@. --- libsndio/sio_open.3 | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/libsndio/sio_open.3 b/libsndio/sio_open.3 index a1e2b6c..6c5f215 100644 --- a/libsndio/sio_open.3 +++ b/libsndio/sio_open.3 @@ -478,14 +478,11 @@ may be set if an error occurs, even if it is not selected with .Fn sio_pollfd . .Pp -The +The size of the +.Ar pfd +array, which the caller must pre-allocate, is provided by the .Fn sio_nfds -function returns the number of -.Vt pollfd -structures the caller must preallocate in order to be sure -that -.Fn sio_pollfd -will never overrun. +function. .Ss Synchronizing non-audio events to the audio stream in real-time In order to perform actions at precise positions of the audio stream, such as displaying video in sync with the audio stream, @@ -668,32 +665,49 @@ argument, except and .Fn sio_eof , stop working (i.e. always return 0). -.Pp The .Fn sio_eof -function can be used at any stage; -it returns 0 if there's no pending error, and a non-zero -value if there's an error. +function can be used at any stage. .Sh RETURN VALUES The .Fn sio_open function returns the newly created handle on success or NULL on failure. +.Pp The .Fn sio_setpar , .Fn sio_getpar , .Fn sio_getcap , .Fn sio_start , .Fn sio_stop , -.Fn sio_pollfd , and .Fn sio_setvol functions return 1 on success and 0 on failure. +.Pp +The +.Fn sio_pollfd +function returns the number of +.Va pollfd +structures filled. +The +.Fn sio_nfds +function returns the number of +.Va pollfd +structures the caller must preallocate in order to be sure +that +.Fn sio_pollfd +will never overrun. +.Pp The .Fn sio_read and .Fn sio_write functions return the number of bytes transferred. +.Pp +The +.Fn sio_eof +function returns 0 if there's no pending error, and a non-zero +value if there's an error. .Sh ENVIRONMENT .Bl -tag -width "SNDIO_DEBUGXXX" -compact .It Ev AUDIODEVICE