Ok, I have now made an OpenAL sound audio class, but i am having troubles;
I have the code below:
Code:
const
cMaxSources = 10;
type
TxeAudio = class(TxeBaseObject)
private
FSounds : TStringList;
FSourcePool : array[0..cMaxSources - 1] of TALuint;
public
Code:
constructor TxeAudio.Create;
var
ALResult: TALenum;
begin
inherited Create(False);
if not InitOpenAL then
begin
LogFile_LogMessage('Error initializing OpenAL!');
end;
alGenSources(cMaxSources,@FSourcePool[0]);
ALResult := alGetError;
if ALResult <> AL_NO_ERROR then
begin
LogFile_LogMessage('Error creating OpenAL sources!');
end;
But for some reason when I call alGenSources(), my FSourcePool array is all zeros still, and I am getting no error (or log file output).
Is this normal?
cheers,
Paul
Bookmarks