Method

ALSARawmidiStreamPairread_from_substream

Declaration [src]

gboolean
alsarawmidi_stream_pair_read_from_substream (
  ALSARawmidiStreamPair* self,
  guint8* const* buf,
  gsize* buf_size,
  GError** error
)

Description [src]

Copy data from intermediate buffer to given buffer for substream attached to the pair of streams. In a case that the instance is opened without O_NONBLOCK flag and the intermediate buffer has no data, call of the API is blocked till any data is available.

The call of function executes read(2) system for ALSA rawmidi character device.

Parameters

buf An array of guint8*
 

The buffer to copy data.

 The argument will be modified by the function.
 The length of the array is specified in the buf_size argument.
 The instance takes ownership of the data, and is responsible for freeing it.
buf_size gsize*
 

The size of buffer.

 The argument will be modified by the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE when the overall operation finishes successfully, else FALSE.