Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-04

Simple beep sound Linux

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Stratmann

How to program a simple beep in Linux.

Now I have a mainboard which has a speaker, but needs to program using the sound device, I guess. Crt sound() does not work in this case.

Is there another solution as easy as sound() in the crt unit?

Tomas Hajny
to Rainer Stratmann
Rainer Stratmann wrote 6 lines
How to program a simple beep in Linux. Now I have a mainboard which has a speaker, but needs to program using the sound device, I guess. Crt sound() does not work in this case. Is there another solution as easy as sound() in the crt unit?

If talking about a simple console application not using unit Crt, you can issue a beep using "Write (#7)". Google helps you in finding various gotchas/limitations of this solution though (this topic has been discussed before, search for FPC, Linux, SysUtils.Beep and "Write (#7)").

Tomas