10 #ifndef LIBOPENMPT_STREAM_CALLBACKS_FD_H
11 #define LIBOPENMPT_STREAM_CALLBACKS_FD_H
45 fd = (int)(uintptr_t)stream;
53 if ( bytes < (
size_t)INT_MAX ) {
58 ret_read = _read( fd, dst, to_read );
59 if ( ret_read <= 0 ) {
66 retval = read( fd, dst, bytes );
static size_t openmpt_stream_fd_read_func(void *stream, void *dst, size_t bytes)
Definition: libopenmpt_stream_callbacks_fd.h:36
static openmpt_stream_callbacks openmpt_stream_get_fd_callbacks(void)
Provide openmpt_stream_callbacks for standard POSIX file descriptors.
Definition: libopenmpt_stream_callbacks_fd.h:85
Stream callbacks.
Definition: libopenmpt.h:300
openmpt_stream_read_func read
Read callback.
Definition: libopenmpt.h:306