[LAD] Replacement for KbdCtl.bell
Joel Roth
joelz at pobox.com
Fri Feb 4 11:50:22 CET 2022
On Fri, Feb 04, 2022 at 11:25:30AM +0100, Peter wrote:
> Dear Joel,
>
> Am 04.02.22 um 11:02 schrieb Joel Roth:
> [...]
>
> > > There I was using the KbdCtl.bell_* to generate tones with a given frequency and duration:
> > >
> > > // switch to new state
> > > KbdCtl.bell_percent = 100;
> > > KbdCtl.bell_pitch = Frequency;
> > > KbdCtl.bell_duration = Duration;
> > > XChangeKeyboardControl(pDisplay, KBBellPercent | KBBellPitch | KBBellDuration, &KbdCtl);
> > >
> > >
> > > Is there still such a simple method available to generate a tone with a given duration and frequency.
> > > Of course I could generate a corresponding array and send it to jackd, I'm just looking for something simple.
> >
> > 1200Hz for 10s
> >
> > ecasound -i:tone,sine,1200,10 -o:jack,system
>
> thanks, yes this work nicely from the command line.
> However, calling this from a small C-code looks not like a simple solution,at least one has to install ecasound,
> on on quick search I couldn't find an API for it.
You would have to install it, but there is a C API.
https://ecasound.seul.org/ecasound/Documentation/programmers_guide/html_ecidoc/eci_doc.html#sec22
> I also tried pysine, but I have difficulties to get it running.
>
> To refine my question, I'm looking for a simple replacement usable within C.
> Best regards,
> Peter
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> https://lists.linuxaudio.org/listinfo/linux-audio-dev
--
Joel Roth
More information about the Linux-audio-dev
mailing list