snd_rawmidi_channel_params

Name

snd_rawmidi_channel_params -- set the communication parameters

Synopsis

int snd_rawmidi_channel_params(snd_rawmidi_t *handle, snd_rawmidi_channel_params_t *params);

Description

Sets various parameters for output direction. Function returns zero if successful, otherwise it returns an error code.

typedef struct snd_rawmidi_channel_params {
	int channel;
	int size;
	int min;
	int max;
	int room;
	unsigned char reserved[16];
} snd_rawmidi_channel_params_t;

FlagDescription
channelCan be either SND_RAWMIDI_CHANNEL_OUTPUT or SND_RAWMIDI_CHANNEL_INPUT.
sizeRequested queue size of output buffer in bytes (default setup is 4096 [i386] or 8192 [alpha] bytes - this is system architecture dependent).
min[Input only] Minimum filled bytes in queue for wakeup. Driver blocks the application (if block behaviour is selected) until input buffer is filled with fewer than the number of bytes specified with this value.
max[Output only] Maximum number of bytes in queue for wakeup. If the current byte count of filled portion of output buffer is greater than this value the driver will block an application or return immediately if non block mode is active.
room[Output only] Minimum number of bytes writable for wakeup. This value should be in most cases 1 which means return back to application if at least one byte is free in output buffer.