.\" muroar_beep.3 .TH "muroar_read" "3" "April 2012" "muRoar" "muRoar Programmer's Manual: IO Extension" .SH NAME muroar_read \- Read data from a stream in a portable way .SH SYNOPSIS #include ssize_t muroar_read (muroar_t fh, void * buf, size_t len); .SH "DESCRIPTION" This function reads data from a stream connected to a sound server. It exists to have a portable way to read data from the sound server that does not depend on the underlying operating system. .SH "PARAMETERS" .TP \fBfh\fR The stream file handle connected to the server. This must be opend using \fBmuroar_stream\fB(3). .TP \fBbuf\fR A pointer to the block of data that should be read. .TP \fBlen\fR The total length in byte of the data that should be read. .SH "RETURN VALUE" On success this call return the number of bytes successful read. On error, \-1 is returned. .SH NOTES This function calls the underlying read function in a loop. If this returns less than the given length you should not re-try directly but wait at least some milisecunds. .SH HISTORY This function first appeared in muRoar version 0.1beta0. .SH "SEE ALSO" \fBread\fR(2), \fBmuroar_write\fR(3), \fBmuroar_stream\fR(3), \fBmuroar_close\fR(3), \fBRoarAudio\fR(7). .\" ll