mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 06:27:12 +01:00
* disabled sound/nosound for non-Linux, as the used ioctl is
Linux-specific (and at least under Mac OS X, there seems to be
no way to play sound without going via the Carbon/Quicktime/...
frameworks)
git-svn-id: trunk@7488 -
This commit is contained in:
parent
f12428506e
commit
d1f7be8c7b
@ -1391,21 +1391,27 @@ Begin
|
||||
End;
|
||||
|
||||
|
||||
{$ifdef linux}
|
||||
const
|
||||
KIOCSOUND = $4B2F; // start sound generation (0 for off)
|
||||
{$endif}
|
||||
|
||||
Procedure Sound(Hz: Word);
|
||||
begin
|
||||
{$ifdef linux}
|
||||
if not OutputRedir then
|
||||
fpIoctl(TextRec(Output).Handle, KIOCSOUND, Pointer(1193180 div Hz));
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Procedure NoSound;
|
||||
begin
|
||||
{$ifdef linux}
|
||||
if not OutputRedir then
|
||||
fpIoctl(TextRec(Output).Handle, KIOCSOUND, nil);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user