/* create port */
memset(&src_port_info, 0, sizeof(snd_seq_port_info_t));
- src_port_info.capability = SND_SEQ_PORT_CAP_OUT | SND_SEQ_PORT_CAP_IN;
+ src_port_info.capability = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_READ;
src_port_info.type = SND_SEQ_PORT_TYPE_MIDI_GENERIC;
src_port_info.midi_channels = 16;
src_port_info.synth_voices = 0;
fprintf(stderr, "Cannot set nonblock mode: %s\n", snd_strerror(err));
bzero(&port, sizeof(port));
strcpy(port.name, "Input");
+ port.capability = SND_SEQ_PORT_CAP_WRITE;
if ((err = snd_seq_create_port(handle, &port)) < 0) {
fprintf(stderr, "Cannot create input port: %s\n", snd_strerror(err));
return;
if ((err = snd_seq_block_mode(handle, 0))<0)
fprintf(stderr, "Cannot set nonblock mode: %s\n", snd_strerror(err));
bzero(&port, sizeof(port));
+ port.capability = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_READ;
strcpy(port.name, "Output");
if ((err = snd_seq_create_port(handle, &port)) < 0) {
fprintf(stderr, "Cannot create output port: %s\n", snd_strerror(err));
printf(" Type : 0x%x\n", info.type);
printf(" Midi channels : %i\n", info.midi_channels);
printf(" Synth voices : %i\n", info.synth_voices);
- printf(" Output subs : %i\n", info.out_use);
- printf(" Input subs : %i\n", info.in_use);
+ printf(" Output subs : %i\n", info.write_use);
+ printf(" Input subs : %i\n", info.read_use);
}
}