FreeBSD Programming Tips

This is an old revision of FreeBSD Programming Tips, edited by Trev at . The current revision is 133220.

/* Configuration files */ New section

Work in Progress

FreeBSD Programming Tips

Other Interfaces

Platform specific Tips

Interfaces Development Articles

Configuration Files

Refer to the Multiplatform Programming Guide Configuration files section.

Making a Beep

As SysUtils.Beep has no effect on FreeBSD, I looked around for a way to make a beep and found nothing useful. So, I reinvented the wheel as follows:

    {$IFDEF FREEBSD}
    procedure FBSDbeep;
    var
      BProcess: TProcess;
      begin
        BProcess:= TProcess.Create(nil);
        BProcess.CommandLine := 'sh -c "echo xxxxxxx > /dev/dsp"';
        BProcess.Execute;
        BProcess.Free;
      end;
    {$ENDIF}

Note: /dev/dsp will automatically reroute to the sound device's correct device node (eg /dev/dsp0.0) using the dynamic devfs(5) clone handler.

Qualifications

Using HTTPS

Placeholder. Content to come.