snd_rawmidi_block_mode

Name

snd_rawmidi_block_mode -- set or reset the block behaviour

Synopsis

int snd_rawmidi_block_mode(snd_rawmidi_t *handle, intenable);

Description

Sets up block (default) or non-block mode for a handle. Block mode suspends execution of a program when snd_rawmidi_read or snd_rawmidi_write is called for the time which is needed for the actual output or input over of the selected limit. In non-block behaviour, programs are not suspended and the above functions return immediately with the count of bytes which were read or written by the driver. When used in this way, do not try to use the entire buffer after the call, but instead process the number of bytes returned, and call the function again.