I downloaded a Morse code trainer program that was built under Lazarus.
The program is a few years old since one of the units it was using was
called oldlinux. Changed that to linux, but I am still having a build
problem with a couple of lines. Evidently it does not know how to
handle ioctl.
Here is the offernding procedure. What do I need to do to fix this?
function openAudio(isWrite : Boolean = false) : shortInt;
var
fs : longInt;
begin
result:=AUDIO_ERROR_NOERROR;
if audio_fd <= 0
then begin
initAudioParms;
if isWrite
then
audio_fd:=fpopen(_audioDevice,O_WRONLY,0)
else
audio_fd:=fpopen(_audioDevice,O_RDONLY,0);
if (audio_fd = -1)
then begin
result:=AUDIO_ERROR_CANTOPEN;
end else begin
fs:=$7fff0009;
>> if (NOT ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, @fs))
then begin
closeAudio;
result:=AUDIO_ERROR_CANTSETFSIZE;
>> end else if(NOT ioctl(audio_fd, SNDCTL_DSP_SAMPLESIZE, @bits))
then begin
closeAudio;
result:=AUDIO_ERROR_CANTSETSSIZE;
>> end else if(NOT ioctl(audio_fd, SNDCTL_DSP_STEREO, @stereo))
then begin
closeAudio;
result:=AUDIO_ERROR_CANTSETCHANNELS;
>> end else if(NOT ioctl(audio_fd, SNDCTL_DSP_SPEED, @rate))
then begin
closeAudio;
result:=AUDIO_ERROR_CANTSETSRATE;
end;
end;
end else
result:=AUDIO_ERROR_ALREADYOPEN;
end;
using the latest build of lazarus and FPC.
Thanks
Jeff Steinkamp - N7YG
Tucson, AZ
SCUD Missile Coordinates
N32-13-55.01 W110-50-51.91
http://n7yg.net
http://home.earthlink.net/~jksteinkamp
Linux User #420428
Skype : jeff.steinkamp
_______________________________________________________
A fool and his money are invited everywhere.
____________________________________________________________________________________Be
a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545433
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives