gabriel rosenkoetter on Fri, 1 Feb 2002 20:00:17 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] speaker beep question


On Fri, Feb 01, 2002 at 01:36:27PM -0500, epike@isinet.com wrote:
> I'm really looking to make interesting sounds from the
> speaker thru crontab-activated shell scripts (not X)...
> actually the bell works fine but it would be nice to
> control the pitches too (to indicate failure, success,
> etc).

Uh... xset *can* control the pitch (and duration, and volume). It
won't play some random audio file, but you can't do that with the PC
speaker anyway (though many can probably do midi respectably). And,
as I said before, this may well be wrapped by X cruft, but it's got
to get back to the right thing at some point.

Just the same, I'm not sure it's the best way to attack this
problem. I don't know what Linux does, but NetBSD has the following
in its dmesg:

pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
sysbeep0 at pcppi0

The userland access to these drivers goes through /dev/sound,
/dev/mixer, /dev/speaker... so forth. We keep the manual pages for
this in section 4, and you probably do too. My speaker(4) starts
out:

     The speaker device driver allows applications to control the console
     speaker on machines with a PC-like 8253 timer implementation.

I'm sure Linux has similar functionality. Go check where the ISA
drivers live in your source (you *do* have a copy of the source for
the OS you're developing on, right?) and section 4 of your manual.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpyAAncQU2GA.pgp
Description: PGP signature