|
Next: 7.2 Programming a sound Up: 7 Sound Programming Previous: 7 Sound Programming
7.1 Programming the internal speakerBelieve it or not, your PC speaker is part of the Linux console and thus a character device. Therefore, ioctl() requests exist to manipulate it. For the internal speaker the following 2 requests exist:
The argument consists of the tone value in the low word and
the duration in the high word. The tone value is not the
frequency. The PC mainboard timer 8254 is clocked at 1.19 MHz and so
it's 1190000/frequency. The duration is measured in timer ticks. Both
ioctl calls return immediately so you can this way produce beeps
without blocking the program.
Converted on: Fri Mar 29 14:43:04 EST 1996 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |