muroar_read3
Read data from a stream in a portable way
Usage
#include <muroar.h>
ssize_t muroar_read (muroar_t fh, void * buf, size_t len);
Overview
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.
Parameters
fh-
The stream file handle connected to the server. This must be opend using
muroar_stream(3).
buf-
A pointer to the block of data that should be read.
len-
The total length in byte of the data that should be read.
Return value
On success this call return the number of bytes successful read. On error, -1 is returned.
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.
Releases
6 releases since Debian 6.0 (Squeeze); the text changed 1 time.