On Thu, Aug 03, 2006 at 10:36:35AM -0500, Hugo Vanwoerkom wrote:
No, I don't want to play back anything: I want to *generate* a beeping
sound. The type depends upon the occasion.
So you actually want to synthesize the beep? Is that right?
If you really do want just a beep you could synthesize the sine wave
yourself pretty easily. The one and only source code example in the libao
coincidentally does exactly that.
http://www.xiph.org/ao/doc/ao_example.c
Right now I use Nas, which has good support from Jon Trulson. But that
is meant really as a network sound server and not made for playing back
to a particular sound card.
The libao alsa driver (alsa09), which I assume you would be using, allows
you to specify which device (ie. sound card) you want to use. The oss driver
will too.
E.g. if it is 11:30 I want to produce 5 beeps for maritime chimes.
If the dialup line goes down I want to produce 9 beeps.
I would prefer to produce the beeps for a particular soundcard, for the
user that is logged on to a monotor that uses that card.
A few lines of tweaking to that example I linked above should do exactly
what you want.