Method

ALSARawmidiStreamPairwrite_to_substream

Declaration [src]

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

Description [src]

Copy data from given buffer to intermediate 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 is full, call of the API is blocked till the buffer has space for the data.

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

Parameters

buf An array of guint8
 

The buffer to copy data.

 The length of the array is specified in the buf_size argument.
 The data is owned by the caller of the function.
buf_size gsize
 

The size of buffer.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE when the overall operation finishes successfully, else FALSE.