⤷ Disable/enable speaker

Use SystemParametersInfo function with SPI_SETBEEP parameter.

procedure TForm1.Button1Click(Sender: TObject);
begin
  SystemParametersInfo(SPI_SETBEEP, 0, nil, SPIF_UPDATEINIFILE);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  SystemParametersInfo(SPI_SETBEEP, 1, nil, SPIF_UPDATEINIFILE);
end;
More for developers