snd_rawmidi_channel_status

Name

snd_rawmidi_channel_status -- obtain the communication status

Synopsis

int snd_rawmidi_channel_status(snd_rawmidi_t *handle, snd_rawmidi_output_status_t *status);

Description

Fills the *status structure. Function returns zero if successful, otherwise it returns an error code.

typedef struct snd_rawmidi_channel_status {
	int channel;
	int size;
	int count;
	int queue;
	int pad;
	int free;
	int overrun;
	unsigned char reserved[16];
} snd_rawmidi_channel_status_t;

FlagDescription
channelCan be either SND_RAWMIDI_CHANNEL_OUTPUT or SND_RAWMIDI_CHANNEL_INPUT.
sizeSize of currently allocated queue in bytes.
countCount of bytes writable or readable without blocking.
queueCount of bytes in queue (number of bytes waiting to be output).
freeCount of bytes in queue still free.
overrun[Input only] This value tells the application the count of overruns since the last call to snd_rawmidi_channel_status.