Tweak RETURN VALUES section. Move description of sio_pollfd() and

sio_nfds() return values there and add a paragraph about sio_eof().
From natano@.
This commit is contained in:
Alexandre Ratchov 2017-03-27 14:05:51 +02:00
parent f6579c4341
commit 798435b1dc
1 changed files with 26 additions and 12 deletions

View File

@ -478,14 +478,11 @@ may be set if an error occurs, even if
it is not selected with it is not selected with
.Fn sio_pollfd . .Fn sio_pollfd .
.Pp .Pp
The The size of the
.Ar pfd
array, which the caller must pre-allocate, is provided by the
.Fn sio_nfds .Fn sio_nfds
function returns the number of function.
.Vt pollfd
structures the caller must preallocate in order to be sure
that
.Fn sio_pollfd
will never overrun.
.Ss Synchronizing non-audio events to the audio stream in real-time .Ss Synchronizing non-audio events to the audio stream in real-time
In order to perform actions at precise positions of the audio stream, In order to perform actions at precise positions of the audio stream,
such as displaying video in sync with the audio stream, such as displaying video in sync with the audio stream,
@ -668,32 +665,49 @@ argument, except
and and
.Fn sio_eof , .Fn sio_eof ,
stop working (i.e. always return 0). stop working (i.e. always return 0).
.Pp
The The
.Fn sio_eof .Fn sio_eof
function can be used at any stage; 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.
.Sh RETURN VALUES .Sh RETURN VALUES
The The
.Fn sio_open .Fn sio_open
function returns the newly created handle on success or NULL function returns the newly created handle on success or NULL
on failure. on failure.
.Pp
The The
.Fn sio_setpar , .Fn sio_setpar ,
.Fn sio_getpar , .Fn sio_getpar ,
.Fn sio_getcap , .Fn sio_getcap ,
.Fn sio_start , .Fn sio_start ,
.Fn sio_stop , .Fn sio_stop ,
.Fn sio_pollfd ,
and and
.Fn sio_setvol .Fn sio_setvol
functions return 1 on success and 0 on failure. 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 The
.Fn sio_read .Fn sio_read
and and
.Fn sio_write .Fn sio_write
functions return the number of bytes transferred. 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 .Sh ENVIRONMENT
.Bl -tag -width "SNDIO_DEBUGXXX" -compact .Bl -tag -width "SNDIO_DEBUGXXX" -compact
.It Ev AUDIODEVICE .It Ev AUDIODEVICE