*BSD News Article 46336


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news1.oakland.edu!newsxfer.itd.umich.edu!nntp.cs.ubc.ca!cs.ubc.ca!cs.ubc.ca!not-for-mail
From: coatta@cs.ubc.ca (Terry Coatta)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: playmidi and SB-16
Followup-To: comp.unix.bsd.freebsd.misc
Date: 3 Jul 1995 03:21:54 -0700
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Lines: 42
Message-ID: <3t8gc2$jie@ice.cs.ubc.ca>
NNTP-Posting-Host: ice.cs.ubc.ca

I have got /dev/audio working with my SB-16, but I'm not having much
luck with the midi related stuff.  I compiled the playmidi program from
the 2.0.5R ports collection, but have been unable to get it to work.
When I run the program I get:

  frood: playmidi -f demo0002.mid
  playmidi: No playback device set.  Aborting.

I traced the execution of the program to find out what this meant and
discovered that there is a section of code which looks like:

    if (ioctl(seqfd, SNDCTL_SEQ_NRSYNTHS, &nrsynths) == -1) {
        fprintf(stderr, "there is no soundcard\n");
        exit(1);
    }

On my system, this sets the variable nrsynths to 0, which
forces playmidi to assume that it is using an external midi
device.  I checked the driver source code and found that
this ioctl basically just returns the value of a global
variable called num_synths.  None of the sb or sb16 source
files set/increment the value of num_synths.  I'm not sure
whether this is reasonable or not.

When the kernel boots I get the following information about
the configuration of the sound card:

Jul  3 01:27:52 frood /kernel: sb0 at 0x220 irq 5 drq 1 on isa
Jul  3 01:27:52 frood /kernel: sb0: <SoundBlaster Pro 4.12>
Jul  3 01:27:52 frood /kernel: sbxvi0 at 0x0 drq 6 on isa
Jul  3 01:27:52 frood /kernel: sbxvi0: <SoundBlaster 16 4.12>
Jul  3 01:27:52 frood /kernel: sbmidi0 at 0x300 on isa
Jul  3 01:27:52 frood /kernel: sbmidi: <SoundBlaster MPU-401>

Anybody have any suggestions about where I've gone wrong?

Terry Coatta
coatta@nsg.bc.ca
-- 

Terry Coatta (coatta@cs.ubc.ca)