Hi,
I am quite new to FPC and recently installed Lazarus v.1.8.2+dfsg-3 and FPC under Ubuntu Linux 18.04. It seems to work normally.
I also installed the fp-units-multimedia package of Ubuntu, as I wanted to work with OpenAl.
I copied the files of /usr/share/fpcsrc/3.0.4/packages/openal/ to my home directory and tried to compile the wavopenal.pas with FPC:
fpc wavopenal.pas
The output was:
Free Pascal Compiler version 3.0.4+dfsg-18ubuntu2 [2018/08/29] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling wavopenal.pas
Linking wavopenal
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
330 lines compiled, 0.3 sec
When I try to execute the binary it gives me some errors:
Blocksize : 4
Rate : 44100
Channels : 2
OpenAL Buffers : 4
OpenAL Buffer Size : 20000
An unhandled exception occurred at $00007F13A86C204B:
EDivByZero: Division by zero
$00007F13A86C204B
An unhandled exception occurred at $00007F13A831D66E:
EAccessViolation:
$00007F13A831D66E
$00007F13A83F14C6
The problem seems to occur when the context is created:
al_context := alcCreateContext(al_device, nil);
which I found out aftter inserting some writeln's. Does anyone know what to do to get this to work?
Thanks a lot!