The queue should be started at the very same time of the start of the
stream itself in the interactive mode. Otherwise it'll get bogus long
waits until the start of the clip.
Move the code to start the queue in start_bar(), so that it's always
tied with the start sequence.
Fixes: 1205dd5f6c14 ("arecordmidi2: Add passive mode and interactive mode")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
/* write start bar */
static void start_bar(FILE *file)
{
+ int err;
+
+ /* start the queue */
+ err = snd_seq_start_queue(seq, queue, NULL);
+ check_snd("start queue", err);
+ snd_seq_drain_output(seq);
+
write_start_clip(file);
write_tempo(file);
write_time_sig(file);
start = 1;
}
- err = snd_seq_start_queue(seq, queue, NULL);
- check_snd("start queue", err);
- snd_seq_drain_output(seq);
-
err = snd_seq_nonblock(seq, 1);
check_snd("set nonblock mode", err);