Hello,
I'm trying to use PortAudio (compiled x64 with AsioSDK support on) and I have some trouble :
I got access violation
outputParams.suggestedLatency := Pa_GetDeviceInfo(myAsioDeviceIndex)^.defaultLowOutputLatency; but I don't understand why my callback function isn't recognized.
here ma declaration :
function AudioCallback(const pInputBuffer : pointer;
pOutputBuffer : pointer;
const {%H-}FramesPerBuffer : culong;
const {%H-}pTimeInfo : PPaStreamCallbackTimeInfo;
{%H-}PAStatusFlags : TPaStreamCallbackFlags;
pUserData : pointer) : CInt32; cdecl;
begin
FillChar(pOutputBuffer^, FramesPerBuffer * SizeOf(Single) * 2, 0); // pour 2 canaux en float32
Result := 0; // ou une valeur comme paContinue
end;
...
here my call to callback
LPaError := Pa_OpenStream(LPaStream, 0, 2, paFloat32, 44100, 256, @AudioCallback, @Data);
if not LPaError = 0 then Error;
...
Error msg :
unit1.pas(198,83) Error: Incompatible type for arg no. 7: Got "<address of function(const Pointer;Pointer;const LongWord;const PPaStreamCallbackTimeInfo;LongWord;Pointer):LongInt;CDecl>", expected "PPaStreamCallback"
I put a small demo project if you wish to test it.
Thanks for your help
