OSDN Git Service

Small updates to follow new sequencer changes..
authorJaroslav Kysela <perex@perex.cz>
Thu, 26 Aug 1999 12:01:18 +0000 (12:01 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 26 Aug 1999 12:01:18 +0000 (12:01 +0000)
test/playmidi1.c
test/seq-decoder.c
test/seq-sender.c
test/seq.c

index 315910f..b42b522 100644 (file)
@@ -617,7 +617,7 @@ int main(int argc, char *argv[])
 
        /* 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;
index bb45f34..1c0e48c 100644 (file)
@@ -442,6 +442,7 @@ void event_decoder(snd_seq_t *handle, int argc, char *argv[])
                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;
index 0e38060..595105c 100644 (file)
@@ -170,6 +170,7 @@ void event_sender(snd_seq_t *handle, int argc, char *argv[])
        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));
index c50957f..6b24534 100644 (file)
@@ -96,8 +96,8 @@ void show_port_info(snd_seq_t *handle, int client, int port)
                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);
        }
 }