On Mon, Aug 16, 2010 at 09:55:54PM +0200, pet...@schwertfisch.de wrote: > Hi, > > I've just upgraded to a recent snapshot (August 11th). > There is some trouble with midicat: > > $ midicat -o - | hexdump -e '1/1 "%x"' > Segmentation fault (core dumped) > $ midicat -o - -q rmidi:0 | hexdump -e '1/1 "%x"' > Segmentation fault (core dumped) > $ midicat -o - -q rmidi:1 | hexdump -e '1/1 "%x"' > Segmentation fault (core dumped) > $ midicat -l -q rmidi:0 -s default > $ midicat -o - -q midithru:0 | hexdump -e '1/1 "%x"' > Segmentation fault (core dumped) > $ midicat -dddddd -o - -q midithru:0 | hexdump -e '1/1 "%x"' > Segmentation fault (core dumped) > > Using bsd.sp did not make any difference. > > The following worked fine: > aucat -l -q rmidi:1 > (playback volume could be controlled with the nanokontrol) > > Also > $ midicat -l -q rmidi:1 -s default > $ aucat -l -q midithru:0 > worked as expected. > > Is there anything I could test to find out what is going wrong? >
ah, a bug in the options parsing code, the diff below should fix it, does it? -- Alexandre Index: aucat.c =================================================================== RCS file: /home/alex/sndio/cvs/src/usr.bin/aucat/aucat.c,v retrieving revision 1.89 diff -u -p -r1.89 aucat.c --- aucat.c 23 Jul 2010 16:49:12 -0000 1.89 +++ aucat.c 16 Aug 2010 21:00:31 -0000 @@ -277,10 +277,7 @@ cfstr_add(struct cfstrlist *list, struct struct cfstr *cs; unsigned hdr; - if (strcmp(path, "-") == 0) { - path = NULL; - hdr = HDR_RAW; - } else if (templ->hdr == HDR_AUTO) { + if (templ->hdr == HDR_AUTO) { len = strlen(path); if (len >= 4 && strcasecmp(path + len - 4, ".wav") == 0) hdr = HDR_WAV; @@ -722,6 +719,8 @@ aucat_main(int argc, char **argv) SLIST_REMOVE_HEAD(&cd->ins, entry); if (!cs->mmc) autostart = 1; + if (strcmp(cs->path, "-") == 0) + cs->path = NULL; if (!wav_new_in(&wav_ops, d, cs->mode & MODE_PLAY, cs->path, cs->hdr, &cs->ipar, cs->xrun, cs->vol, cs->mmc, cs->join)) @@ -733,6 +732,8 @@ aucat_main(int argc, char **argv) SLIST_REMOVE_HEAD(&cd->outs, entry); if (!cs->mmc) autostart = 1; + if (strcmp(cs->path, "-") == 0) + cs->path = NULL; if (!wav_new_out(&wav_ops, d, cs->mode & MODE_RECMASK, cs->path, cs->hdr, &cs->opar, cs->xrun, cs->mmc, cs->join))