- ret = snd_seq_create_simple_port (app->seq, DEFAULT_CLIENT_NAME,
- SND_SEQ_PORT_CAP_WRITE |
- SND_SEQ_PORT_CAP_SUBS_WRITE,
- SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_APPLICATION);
+ snd_seq_port_info_alloca (&pinfo);
+ snd_seq_port_info_set_name (pinfo, DEFAULT_CLIENT_NAME);
+ snd_seq_port_info_set_type (pinfo, SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_APPLICATION);
+ snd_seq_port_info_set_capability (pinfo, SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE);
+
+ ret = snd_seq_alloc_queue (app->seq);
+ if (ret < 0) {
+ GST_ERROR ("Cannot allocate queue: %s\n", snd_strerror (ret));
+ return ret;
+ }
+
+ app->queue = ret;
+
+ snd_seq_port_info_set_timestamping (pinfo, 1);
+ snd_seq_port_info_set_timestamp_real (pinfo, 1);
+ snd_seq_port_info_set_timestamp_queue (pinfo, app->queue);
+
+ ret = snd_seq_create_port (app->seq, pinfo);