I solved this bug

When alSourceUnQueueBuffers is called in the TOggStream.Update routine, an AV at adress $00000000 with read $00000000 is raised. Normaly this means that something is not initialized.
This first assumption seemed to be right. The alSourceUnQueueBuffers routine is infact a procvar. I have checked it, but i guess i did something wrong. :? Now it seems that this variabele doesn't get initialized because of a bug in the header.

I found out that alGetProcAddress or GetProcAdress are case sensitive. Apparently the function name was incorrect (It must be "alSourceUnqueueBuffers" with a lowercase 'q'). So it could not be found in the OpenAL32 dll, and it was set to NIL. The result is an AV.

I changed the alProcedure routine to this:

function alProcedure(ProcName : PChar) : Pointer;
begin
Result := NIL;
if Addr(alGetProcAddress) <> NIL then
Result := alGetProcAddress(ProcName);
if result <> NIL then
exit;
Result := GetProcAddress(LibHandle, ProcName);

//check whether succesfull
if Result = nil then OutputDebugString(PChar('Failed to load routine: '+ProcName));
end;
This is better, because you get a notification when some function is not loaded correctly

This way, i found two other functions that could not be loaded:


alHint (It was not present in the OpenAL32 DLL (OAL V1.1) so i removed it)
alDopplerModel (should be "alDistanceModel")


This shows again that a simple typo (which wasn't even mine) can mess up the whole app. :shock: I'm glad i found the sollution